def wrap_with_rewind *io, &block
      io.each do |i|
        i.rewind
      end
      yield
      io.each do |i|
        i.rewind
      end
    end
def wrap_with_rewind *io, &block
      io.each do |i|
        i.rewind
      end
      yield
      io.each do |i|
        i.rewind
      end
    end
Rewinds given IOs before and after the block.