when fixing filenames, change any whitespace instead of only spaces

The previous code was only looking at ' ', rather than \s so tabs
would be left which would also cause an error.