Fixed support for filenames which have spaces in them.

Currently the classes do not support files which have spaces in the name, this will resolve this issue by fetching any of the last parts and imploding them together with a space.

Hope you're happy to merge this as I need this support.

Cheers :)