making version.py more robust