Sorted dictionaries (mostly for tests) because of security improvements in Python 3.3

In Python 3.3 is hash randomization switched on by default. That means dict are no longer sorted by key as in earlier Python versions.