Version numbers

Switch from using $operatingsystemrelease to $operatingsystemmajrelease because CentOS 7 changes the numbering. This change is safe with CentOS 6, but I don't have a CentOS 5 system to test with.