determine version using main.py directly (stricter control), disallow running as root (refs #530)