Fix bug in filelib:wildcard/2 when 'Cwd' is ending with a dot

In such case, filelib:wildcard/2 returned truncated results:
```erlang
  1> file:set_cwd("/usr/lib/erlang/lib").
  ok
  2> filelib:wildcard("stdlib-*/ebin/*.app", filename:absname(".")).
  ["dlib-2.1/ebin/stdlib.app"]
```