Make repair functions work for embedded/local mode of client

Fix for https://github.com/eXist-db/exist/issues/297