Rpc getpath: find a relation path between identifiers. Not the prettiest, but works.