Pull request #255: Make sure that all files are closed upon attempts to open a broken DB.