escape weird file names

Make sure paths are escaped in case they have weird symbols in them