fix bug in bwa index creation detection and search and replace of sorting pbs file