Fix #2977: Error calling IO.write with a FIFO

In MRI, IO.write opens a file with a default mode of File::RDONLY, and does not seek if offset is not given. Fixing these would have rubinius' IO.write behave like MRI's when it's called with a FIFO.