fix bug with converting bam to sam locally for reads without tags

an extra tab was being left at the end of the reads becuase the reads
didn't have any tags. So check for trailing tabs and remove.
Make header parser more robust

parse fields in @SQ line into a hash so order doesn't matter