Fix mounted path splitting to ignore search part

This fixes the mounting to ignore what looks like FQDNs in the
search part of the URL, which fixes URL mangling when passing plain
FQDNs in the search part.