Untag passing specs
Added IO#write and IO.write specs for encoding
IO#write must write the encoded string when encoding is provided
Merge pull request #2580 from anupnivargi/io_write_fixes

IO#write must write the encoded string when encoding is provided