add support for files and paths that have spaces.

This change leaves paths with spaces alone (while wrapping in quotes for command), while replacing spaces with underscores in the actual filename.
Merge pull request #1 from GeoSteve/master

add support for files and paths that have spaces.