Pass the document root to the library, rather than the library to find this out by itself