Fix compatibility with python 2.6
Revert "Fix compatibility with python 2.6"

This reverts commit 3418786aa70c0c36a1f330c0df0bf59a2361fa7c.
Replace set comprehensions, dict comprehensions and set literals
Add NullHandler
Fix tests to run on python 2.6
Fix numbered positions in string formatting operations ({} to {0})