Handling entry into .gitignore

In cases where the last line of the .gitignore is a non-empty line,
this patch ensures that the injected entry isn't concatonated with the
non-empty line.
Merge pull request #10 from jeremyf/fixing-gitignore

Handling entry into .gitignore