Getting r.js optimiser setup

Now builds optimised requirejs bundle
Cleaning up build system a bit