Fixed the path parsing code since it was dependant on how the paths were provided.