Add a newline before appended VCS ignore lines
The `cargo init` command appends to `.gitignore` or `.hgignore` without checking if the last line of the existing file ends with a newline.
This change will insert a newline before the appended lines. If the last line has no newline, this will ensure the lines are kept separated. If the newline is present, this will insert a blank line. Both Git and Mercurial ignore blank lines in these files.