Made extend_match start with incrementing the indices by dir1; this also fixed the off by one error in align_ungapped