Updated tests and added a better implementation to get currently installed packages.