use arcpy.GetInstallInfo

This should be more portable and maintainable. Tested with 10.1.