(TK-48) Improve proxy request URI construction logic

Prior to this commit, the proxy URI request construction would
always add a slash to the URI.  In cases where this wasn't
necessary, it would cause failures.

This commit changes the implementation to use a constructor
from the Java URI class, and takes a bit more care to make sure
that we have slashes in the correct places in order to build
up the URI properly.