Fix fixmate's properly paired check, add sam/cram output, add tests

Previously fixmates did not take into account whether a read was on forward or reverse strand
when determining it's position for properly paired check, and added testcase for this.
Stole code from bam_sort to that we can optionally output SAM or CRAM (may be a bad idea for
name sorted files but will deal with this later; may also need reference).
Add tests to test harness.