added support for GZ and BZ2 compression in reading and writing FoLiA documents