Make writing records work correctly: (Table.__init__): Keep track of whether the DBF is open for writing (Table.write_record): Open the DBF file for writing when necessary