gettop: fix symlink detection