Add newline at end of written files

Without this, GitHub will show a "No newline at end of file"
warning for the high water mark files.