Open flags used by openAt.
openAt
Create file if it does not exist.
Fail if not a directory
Fail if file already exists.
Truncate file to size 0.