py3k: fixed version detection

the commands modules was removed in python3, use subprocess instead