Updated implementation of add_tags

- Avoid having samtools read the same file in 2 instances, the possible
cause of segmentation faults