title: Dojo Build System - custom paths hash not working
body: <p>I am trying to switch from the old dojo build system to the new one. I have been pulling my hair out but I can't seem to get the build script to pick up the custom paths mapping that i specified in the building profile. So if my project structure is like:</p>
  
  <pre><code>/www/dojo
  /www/dojox
  /www/dijit
  /www/app.profile.js
  /www/myapp/package.json      #links to myapp.profile.js
  /www/myapp/myapp.profile.js  #standard package profile stub
                               #with test,copyOnly,amd 
  /www/myapp/main.js
  /www/myapp/bar/hello.js
  /www/myapp/bar/sometext.html
  </code></pre>
  
  <p>The files look like below:</p>
  
  <pre><code>//-------------------------------------------
  //FILE: app.profile.js
  //-------------------------------------------
  var profile = (function(){
      return {
          basePath: ".",
          releaseDir: "builds",
          releaseName: "v0_0_1",
          optimize: "closure",
          cssOptimize: "comments",
          action: "release",
  
          packages:[
          {
             name: "dojo",
              location: "dojo/dojo"
          },
          {
             name: "myapp",
             location: "myapp"
          }
          ],
  
          prefixes: {
              "foo": "bar" //doesn't seem to work?
          },
  
          paths: {
              "foo": "bar" //doesn't seem to work?
          },
  
          loaderConfig:{
          paths: {
              "foo": "bar"  //doesn't seem to work?
          },
      },      
  
      layers: {
          "mypp/myapp-release": {
              include: [
                  "myapp/main"
              ]
          }
      }
  };
  })();
  
  //--------------------------------------
  //FILE: main.js
  //--------------------------------------
  require(["dojo/_base/html", "foo/hello", "dojo/text!foo/sometext.html"], 
      function(html, Bar, sometext){
          alert(sometext);
      }
  );
  
  //--------------------------------------
  //FILE: hello.js
  //--------------------------------------
  require([ ], 
      function(){
          alert("hello!");
      }
  );
  </code></pre>
  
  <p>And I am running the build command with:</p>
  
  <pre><code>node /www/dojo/dojo.js load=build /www/app.profile.js
  </code></pre>
  
  <p>The build script would tell me that the dependency "foo/hello" is not found, even though it should have been mapped to bar/hello.js ; the same goes for foo/sometext.html . </p>
  
  <p>Any help would be really appreciated; I don't want to keep pulling my hair til I'm bald! :D</p>