Add some extra style checks to jshint and fix them in the files

There isn't a huge need for this function to be `npm`-specific if we're just going to run `sh` behind the scenes though.