Added support for filenames with spaces in them.