io: fix Copyn EOF handling

Fixes #1383.

R=r
CC=golang-dev
https://golang.org/cl/3821044
2 files changed