better path munging