Make script works with python 2.6
Merge pull request #2 from ConstdR/master

Small changes to make script usable in our setup