updating from heng's branch. Added in support to read local and remote .bai files if .bam.bai is not present