fix the handling of file names containing whitespace