Fix issue where plugin fails if directory has a .
Merge pull request #4 from AdamFerguson/better-directory-support

Fix issue where plugin fails if directory has a `.`