Keep one trailing newline if there was any

This plays nicer with VCS