Ensure generated JST templates are added to the built distribution

These fixes ensure that the generated JST templates are added to dist. It also removes the default templates.js from the app/scripts folder - providing it only if JST doesn't generate any  templates.

[This is single feature pull request - zeripath/master contains these commits already]