Add ensure parameter to packages

Allows setting ensure to 'latest' to upgrade packages.