now also works for single directories
Merge pull request #561 from ffrensch/master

now also works for single directories