use lstat to detect symlink.