Fix bugs with filenames with spaces in them.