properly implement writing out long style textgrids to file.
add tier type attribute to tiers.
update unit tests.