percent-encode spaces in URL paths

Fixes #28.

The RFC says that commas are reserved characters too (and should thus be escaped), but URI.escape doesn't do that. Leaving for now as it's not causing problems in Flapjack.