Add support for Python 2.6 in test code

Fixes problems with the test code under Python 2.6. This branch passes the [Travis CI build](https://travis-ci.org/cbmi/avocado/builds/7746950).