Better checking for proper package extension while installing or upgrading