Fix bug in processing of open modes in POSIX open.