Add ensure parameter to packages

Allows setting ensure to 'latest' to upgrade packages.
same comment as above with regards to validate_string()