Set document base when loading a graph

Otherwise, the file location is used, which is not always a correct URI
in Windows, leading to annoying warnings.