Only append a slash to the directory if there isn't one on the end.
Merge pull request #155 from thedax/master

Only append a slash to the directory if there isn't one on the end.