Ensure paths are URI encoded, without double encoding

This includes PR #355, which fixes #328, but adds/uses the `WEBrick::HTTPUtils.escape` implementation.
See also #338