Fix GetRelativePathToRoot function for NCX and OPF resources.