insert a newline before shell functions

If the user ends their existing shell script (.bashrc or .zshrc) without
a newline, then it can lead to an error. It is safer not to assume a
newline at the end but insert one anyway.
Merge pull request #5 from murphyslaw/newline-in-shell-scripts

insert a newline before shell functions