Add glob support to pkg.version

This commit will allow one to use wildcards in the argument(s) to
pkg.version, which will enable one to get the version of all packages
that match the pattern. Multiple arguments to pkg.version are still
allowed.