make FilterSamReads work in scenarios that create empty output files. start converting some samtools calls to pysam.