(lstat) [!S_ISLNK]: Use stat instead of lstat.