Fix version.py to work when running unit tests