fix unit tests on Python 2.6 and 2.4

merging this will include the commits in https://github.com/hpcugent/vsc-base/pull/17