pkgutil module improvements

I added the option update_catalog for my recent module pkgutil. With update_catalog = yes it will refresh the package catalog right before installing a new packe or for upgrading.
Moreover there are some new lines for error handling.