What Vim "adds" to the end of the last line in a file is the "end of line" character. End of line character is a line terminator - the last line of the file is effectively the last one with an "end of line" character. You can get around that issue by doing the following: before you write your file, do :set binary noeol if you want it to stay "end of line-free".