Add trailing newline option to beautify options

Just a boring commit to
1) update `package.json` and `Gruntfile.js` to have `grunt beautify` add a newlines at the end of files
2) refactor all the files without a trailing newline