improving version.py -- more robust