Symlink functionality for state file.recurse

Resolves part 3 of 3 for issue #5645. It can now be marked as resolved.

Added logic in state file.recurse to support symlinks.

Other various changes to support this effort.

Send it to the gauntlet and blow holes through it so that one day it will become bullet proof :-)