Fix check_for_hardlink.

Changes to hl were not propagated to the caller, so it was always empty
and none of the hardlinks was ever detected.
need to realpath restricted if it's symlink/amd-automount