Eliminate extra newlines.

* No additional trailing newline after the last type in a file.
* No additional newline between package and types when there are no imports.
I'd suggest introducing a String sep variable and changing the loop back to a for-each.