Remove duplicated code: URIUtils::GetDirectory and URIUtils::GetParentPath