NUL terminate in ReadToTok if possible.

Eliminate spurious warning about signed/unsigned comparisons.