Added specs for IO.new with closed IO streams.
Added checks in IO.new & Kernel#flush_stdio for closed IO streams.