am 5535b051: write_file: introduce O_NOFOLLOW, use sane mask

* commit '5535b05120fa3fd3d68a09e01284aba35cc6e058':
  write_file: introduce O_NOFOLLOW, use sane mask