Allow permutation to return just one permutation.

fix gh-2158
I made a ticket for that: https://github.com/Theano/Theano/issues/2177