URIUtils: fix out of range exception in resolvePath()
Merge pull request #4321 from Montellese/uriutils_resolvepath_fix

URIUtils: fix out of range exception in resolvePath()