Fix incorrect EOF handling

Expect assumed that a return value of 0 from Tcl_ReadChars was an EOF.
This is however not always the case, rather EOF needs to be explicitly
tested for using Tcl_Eof().

Signed-off-by: Nils Carlson <pyssling@ludd.ltu.se>