fixed invalid logic with empty directory
Merge pull request #1 from madisparn/master

thank you