added fixes for checking of invalid and new paths
Merge pull request #7 from flyvictor/path-checking

added fixes for checking of invalid and new paths