Escape characters in the filepath. Refix #508