Fix tdb_check() to work with read-only tdb databases. The function tdb_lockall()...