encode decode adjustments on incoming and outgoing uri

REQUEST_URI is usually going to be a bytes (the request line
is treated as such) so we need to decode it before comparing
with PATH_INFO (which will have a str value).

Outgoing Location header values need to be str according to pep3333.