Fix permutedims when permutation is a tuple