made tweaks to handle sequence names where contig id has an underscore. added output file of sequence with any inverted repeats