replace space by %20 in connection string before passing to url.parse
Merge pull request #259 from francoisp/master

here's the change and the test