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. This fixes issue #812.