Convert the path to a string before escaping.