Fixes when dir has spaces/non url friendly chars
Spaces in files too.
Merge pull request #5 from EdShaw/PathsWithSpace

Fixes when dir has spaces/non url friendly chars