Fix libxml_PyFileGet with stdout on macOS macOS returns O_RDWR for standard file descriptors, but fails to write to stdout or stderr when opened with fdopen(dup_fd, "rw").