Support symlinks in listDirectory