Added function to write huffman tree to file. Removed usage of the pseudo-eof char.