title: RequireJs Optimization on Windows fails
body: <p>Trying to optimize an requirejs-based project on Windows. Have put the r.js.cmd in the Scripts folder along with the following nodeBuild.js file.</p>
  
  <pre><code>({
  baseUrl: ".",
  paths: {
      jquery: "empty:"
  },
  name: "main",
  out: "main-built.js"
  })
  </code></pre>
  
  <p>When using the command</p>
  
  <pre><code>node r.js.cmd -o nodeBuild.js
  </code></pre>
  
  <p>I get the following response:</p>
  
  <pre><code>r.js.cmd:1
  (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0
                                                                ^
  SyntaxError: Unexpected token ILLEGAL
  at Module._compile (module.js:439:25)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:906:3
  </code></pre>
  
  <p>Tried searching for it but can't find similar error description and since it is windows I use the r.js.cmd instead of the r.js. The requirejs main.js file is in the Scripts folder and all other modules is in subdirectories to that.</p>