Bug 1029385 - Rewrite app-makefile rule in javascript

It would be great to add a comment before this block about what we are doing here.
Something like `generate a specific require path for each app starting with app folder name, so that we can load each app 'build.js' module.`.