encode input URLs before building fully-qualified URLs

Fixes https://github.com/featurist/coypu/issues/99