Fix handling of file names with spaces