Fix #4.
Fixes dir not ending with /.
Merge pull request #5 from romainreuillon/master

Fix #4.