Adds bam sorting before indel-realignment, and fixes some bugs in tool/bam