make script work with spaces in file names