[[ListFolderEntries]] Properly handle directories other than the CWD.

On some platforms, directory entry names are passed directly to
e.g. the stat(2) system call in order to get information such as the
file type, size and permissions.

When arbitrary directories can be listed, it is necessary to construct
a proper path, rather than assuming that the directory entry name will
be correctly resolved relative to the current working directory.