Force unicode for path components in RestEndpoint

2.6 is broken if you use .format() with unicode params on a str type.  This
just forces pc to be unicode.

cc @kyleknap @garnaat