improve scripts to allow spaces in file names