Use glob to expand the path in vim

Normal `isdirectory` only takes absolute pathnames, so use `glob` to
expand the path before passing it to `isdirectory`.