Add new options: --sort and --rsort

I'm using a new branch and I've squashed the commits.

Sorry for the noise.