pkg_grep_summary: use of getopts, minor clean-ups