pathToDir: fix