lib/js/Gruntfile.js: Generalized to add some level of Windows CMD support (not complete yet)
diff --git a/lib/js/Gruntfile.js b/lib/js/Gruntfile.js
index 87b826f..4421f0c 100644
--- a/lib/js/Gruntfile.js
+++ b/lib/js/Gruntfile.js
@@ -39,27 +39,22 @@
     },
     shell: {
       InstallThriftJS: {
-        command: 'mkdir -p test/build/js/lib; cp src/thrift.js test/build/js/thrift.js'
+        command: 'cp src/thrift.js test/build/js/thrift.js'
       },
       InstallThriftNodeJSDep: {
-        command: 'cd ../..; npm install'
+        command: 'cd ../.. && npm install'
       },
       InstallTestLibs: {
-        command: 'cd test; ant download_jslibs'
+        command: 'cd test && ant download_jslibs'
       },
       ThriftGen: {
         command: [
-          'mkdir -p test/gen-js',
-          '../../compiler/cpp/thrift -gen js --out test/gen-js ../../test/ThriftTest.thrift',
-          '../../compiler/cpp/thrift -gen js --out test/gen-js ../../test/JsDeepConstructorTest.thrift',
-          'mkdir -p test/gen-js-jquery',
-          '../../compiler/cpp/thrift -gen js:jquery --out test/gen-js-jquery ../../test/ThriftTest.thrift',
-          'mkdir -p test/gen-nodejs',
-          '../../compiler/cpp/thrift -gen js:node --out test/gen-nodejs ../../test/ThriftTest.thrift',
-          'mkdir -p test/gen-js-es6',
-          '../../compiler/cpp/thrift -gen js:es6 --out test/gen-js-es6 ../../test/ThriftTest.thrift',
-          'mkdir -p test/gen-nodejs-es6',
-          '../../compiler/cpp/thrift -gen js:node,es6 --out ./test/gen-nodejs-es6 ../../test/ThriftTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js --out test/gen-js ../../test/ThriftTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js --out test/gen-js ../../test/JsDeepConstructorTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js:jquery --out test/gen-js-jquery ../../test/ThriftTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js:node --out test/gen-nodejs ../../test/ThriftTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js:es6 --out test/gen-js-es6 ../../test/ThriftTest.thrift',
+          '"../../compiler/cpp/thrift" -gen js:node,es6 --out ./test/gen-nodejs-es6 ../../test/ThriftTest.thrift',
         ].join(' && ')
       },
       ThriftGenJQ: {
@@ -290,7 +285,17 @@
     }, 1000);
   });
 
+  grunt.registerTask('CreateDirectories', 'Creating required local directories', function () {
+    grunt.file.mkdir('test/build/js/lib');
+    grunt.file.mkdir('test/gen-js');
+    grunt.file.mkdir('test/gen-js-jquery');
+    grunt.file.mkdir('test/gen-nodejs');
+    grunt.file.mkdir('test/gen-js-es6');
+    grunt.file.mkdir('test/gen-nodejs-es6');
+});
+
   grunt.registerTask('installAndGenerate', [
+    'CreateDirectories',
     'shell:InstallThriftJS',
     'shell:InstallThriftNodeJSDep',
     'shell:ThriftGen',