Fixed support for filenames which have spaces in them.