Properly handle paths with escape characters.