directories were not handled correctly
Merge pull request #2 from Maturin/master

directories were not handled correctly