posix: copy and paste can be harmful, fix stat(), lstat()