[SmartOS] Fixes for pkg.is_installed

1) The regex is fixed for packages installed (if you try to install zip and have bzip installed, zip package wont be installed)

2) Fix the case where `pkgin` cache is not present. If you run `pkgin list`, `pkgin` will ask to update the database interactively, answering `y`