Generate files with consistent whitespace

All lines in a text file should end with a single new-line character,
even the last line in the file.