Fix a wrong comparison and saving a sorted set

```py
if session.server_version < (2, 4, 0):
```

This comparison is always `True` because the type of `session.server_version` is `str`, so comparing it with a tuple would be affected by [this rule][1].

[1]: http://docs.python.org/2.7/tutorial/datastructures.html#comparing-sequences-and-other-types