Query sorting

Sorting is broken (see #20), not because it doesn't work, but because the docs say `sort` and the code says `order`. Given that the tests are using `sort` too, I'm assuming that is what is expected, so adding it to the possible ordering values rather than 'fixing' the docs.