Use Base.isperm() to check validity of the permutation.
This is more efficient than the previous method.
Merge pull request #2 from jlapeyre/isperm

Use Base.isperm() to check validity of the permutation.