Properly collect --list matches when pattern matching

We can't rule out the possibility of multiple matches when using the
--list operation with --glob or --regex. And, we can't allow repo/pkg
style syntax when we aren't performing exact matches.

This also fixes sorting of results, since they would otherwise still by
sorted by their path.

Based on a patch by: Simon Gomizelj <simongmzlj@gmail.com>
man: clarify behaviors of -u and -l