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.
I see. I actually saw similar code under spec/ and thought it was the preferred way to do it. Thanks for the feedback. I'll remove the conditional and also use the appropriate library functions instead of shell executables.