Newlines at end of file

I went through all files and added newlines (with a script) and normalized the newlines at the end of the files. That is helpful for automatic concatenation of the files. See [this Q&A on StackOverflow](http://stackoverflow.com/questions/729692/why-should-files-end-with-a-newline) for a discussion. One commit adds newlines where they were missing, the second removes empty lines at the end of a file (and only there), just to keep things tidy.