Fix Python2.6 bug and add Tox configuration