normalise request path_info so that string indexing works properly

Hi,

Recently I had a problem with sub-requests, that contain a doubled // in the url path. These doubled slashes are generated by some default javascript. In my case the one that tries to call @@updateSharingInfo view. 

As the path that is being used to remove the path part of the request path_info is normalised but the the path in the PATH_INFO is not, it generated some non existent urls.

The added test fails without the supplied fix.

Hope this is useful.

cheers