added additional validations for package_ensure

Signed-off-by: Warren Clarke <wclarke@lastminute.com>