Add trailing newline flag to beautify options

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