Fixed handling of files with spaces in filename.