Fix close_write to only close write side throughout.

IO#close_write 100%.