Add checks for StringIO and fix file IO on windows.
Add checks for StringIO and fix file IO on windows.

increments/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,xml4r/libxml-ruby,sferik/libxml-ruby,increments/libxml-ruby,sferik/libxml-ruby