Fix reading from closed files; begin basic support for reading of records and gtables