Permutation patterns and the phototranspositions of 2-cyanopyrroles