[FixRM #8317] - Fix possible double slash in file path

It is possible to have a double slash in the base path, shouldn't
happen.
Use TARGETURI
Land #2257, @wchen-r7's patch for [SeeRM #8317]