Added function to ensure certain packages are installed.