fix Ruby 1.9 encoding related issue: make sure buf has correct encoding.

IO#read() always returns ASCII-8BIT string on Ruby 1.9, regardless of external_encoding of IO object.
Without this fix, Object.systemu returns ASCII-8BIT string as 'stdout' and 'stderr', but it is unnatural on Ruby 1.9.