Update trailing slash for search params.

When navigating to `?foo=bar`, the resultant url should be `/root?foo=bar`, not `/root/?foo=bar`.