Added trailingNewline option

Adds or removes a newline from the end of the file.
Defaults to false (removal), as that's the current behavior.