Fixes requirejs task for building.
Fixes many more problems with the build task.