diff --git a/biopet.wdl b/biopet.wdl
index 8bdf7fbb148d3ac7ba3b8663b5c8c2ecaf6716a2..d394bd586b108211da33720f4a6ea64cb854a95a 100644
--- a/biopet.wdl
+++ b/biopet.wdl
@@ -61,7 +61,7 @@ task SampleConfig {
     command {
         set -e -o pipefail
         ${preCommand}
-        mkdir -p . $(dirname ${jsonOutputPath}) $(dirname ${tsvOutputPath})
+        mkdir -p . ${"$(dirname " + jsonOutputPath + ")"} ${"$(dirname " + tsvOutputPath + ")"}
         java -jar ${tool_jar} \
         -i ${sep="-i " inputFiles} \
         ${"--sample " + sample} \