ndi.dataset.database_openbinarydoc will not find documents in its sessions
The fix will have to deal with the fact that in order to close database_closebinarydoc, the session will be needed.
Perhaps make an object cleanup function so that one no longer needs to call closebinarydoc at all.