Add check for empty working directory
Merge pull request #427 from dlsniper/project-upgrade

Add check for empty working directory (fixes #186)