Fixed table naming problem and WRITE works

WRITE tablename; writes the table to a tablename.db, formatted in the
required DML