Tweaked version handling for debian, changed os.popen to subprocess.Popen