fixed reading and writing text files (key - latin1);

fixed reading empty lines from tbl files;
converted tabs to 4 spaces.