Added a function that checks whether a certain package is installed.