Fixed scatter/gather template vars ; Added permutation_iterator tests