Skip symlinks when change permissions.

As pointed out by harmw, this can cause failures
while doing installs of FreeBSD, since the links
there are absolute, which ends in permission
failure.  However, the bug is more insidious than
that, especially when running Oz as root.  In the
case where the symlinks are absolute, then Oz will
*succeed* in changing the targets of the symlinks,
which will change permissions on the host OS.  This
is obviously not what was intended.

The fix is pretty simple; skip symlinks when trying
to change permissions.  Since we are walking the
whole tree, we'll hit the target of the symlink
eventually anyway.  While we are at it, combine
two very similar looking pieces of code into a
function.

Signed-off-by: Chris Lalancette <clalancette@irobot.com>