Checking more reliably if a package is installed.
Checking if wget is installed as well.