Shouldn't this be `mode&os.ModeSymlink == os.ModeSymlink` ?