Add posix flag to handle non-mmaped files. Also fix DUP2 bugs.