readdirSyncRecursive: follow symlinks only if we haven't read the destination yet

Fix an issue whre readdirSyncRecursive will get into infinite loop for
circular symlinks.

Note: fix to readdirRecursive is also needed.
Merge branch 'readdirSyncRecursive-symlink-loop-bugfix'