AncestorImpl#getRelativePath doesn't return correct value if url doesn't end with /

If the servlet path doesn't end with /, then the computed relative path
should be shifted by one level.