liglob: allow "." and ".." to be matched

... also don't read the whole directory if the glob for that path
component doesn't contain any wildcards or anything.

By default `*` still won't match `.` and `..` but will match e.g.
`.git`, but something like `../*.jpg` will work now, and `.*` will match
both `.` and `..` which seems consistent with shell expansion.