Add isPathInCurrentDir
And fix some small coding issues