Fix problem when .. exists in a path