Updated scripts to work with pathnames containing spaces.