diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -72,7 +72,7 @@ Watchify.prototype.build = function () {
 
   var outputFile = destDir + '/' + this.options.outputFile;
 
-  mkdirp.sync(path.basename(outputFile));
+  mkdirp.sync(this.outputPath + '/' + path.dirname(outputFile));
 
   this.options.browserify.basedir = this.cachePath;
ensure directory for output exists, but relative to the outputPath