added correct handling of EOF in PGCopyInputStream

This is a fix for #157