Set errno in tdb_open in cases where we detect an error in opening the