Move code related to various tag file formats into tm_source_file.c