Various fixes

* fixed #69 
* fixed the very annoying fact that templates were **always** loaded in .js (built version) rather than in .js when run from build/ and in .jade when run in dev mode.