Handle spaces in pathnames