avoid assumptions about textual form of paths in posix ReadDirectory impl

Instead of being 'clever' and trying to avoid an unnecessary path
construction when finding the FileSource-root-relative path to a
directory entry, just use JoinPath.  This avoids problems caused by
the FileSource root unexpectedly having a trailing slash.

fixes #2545
Merge remote-tracking branch 'jpab/issue-2545'