Permutation polynomials and primitive permutation groups