Fix bug with handling filenames with spaces.