ensure all files we create end with a single newline

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
Merge branch 'issue/312' into production