fails:IO.new raises an Errno::EBADF if the file descriptor is not valid
fails:IO.new raises an IOError if passed a closed stream
