Fix error when path contains periods