More robust OS versioning.

Previous version of script was testing for `sw_vers -productVersion |
awk -F. '{print $1}'` when it should have been testing for `sw_vers
-productVersion | awk -F. '{print $2}'`.