support saving both user/group and permissions on symlinks (from PR)
support saving both user/group and permissions on symlinks (from PR)

also fix a slight bogon that assumed an fd of 0 was not valid.  Changed
it to be -1.

PR:		bin/25017
Submitted by:	Martin Kammerhofer

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase