Fix errors when installing with NPM

Hi,

I tried to install this with NPM but it had some errors with the postinstall script. I addressed those errors and also made the template name normalization follow the latest Brunch convention.