Checking for newline at EOF in modules.file.append()
Fixed empty file case in modules.file.append()

Lines are simply inserted at the beginning of the file for empty files.
Merge pull request #7655 from flupke/fix-file-append

Checking for newline at EOF in modules.file.append()