improve error handling in `bundle-open' and `bundle-list-gems'