Accounted for case where there are no version specific packages
Updated regex for detecting version in /etc/redhat-release