Fix bug in processing directories.
Merge pull request #2 from borysiam/master

Fix bug in processing directories.