Fix bug in path munging.