Js-beautify issues, newlines at eof, and added a test