diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -123,6 +123,12 @@ function writeAndRunCodeBlocks(codeBlocks) {
         }
       });
     });
+  })
+  .then(function(codeBlocks) {
+    return removeOldDir(dir)
+      .then(function() {;
+        return codeBlocks
+      });
   });
 }
fix: remove old directory from running markdown

This was forgotten in a previous change.