Make get-flavor.sh more general

Prior code handles OS version case by case. When using CentOS 6.6 or some other versions, rpm-build.sh would fail.