added a step to create index for the input BAM if one does not exist already