add some Unix interop (missing O_BINARY, replaced tell with lseek)