Refactor linux distro checking

Replaced the gross master array list of linux distros with a nice clean dictionary
based approach.