changed output extension to .bwa.sam, added sam2bam step, added flagstat step