libsmartcols: clean up test.c example

Signed-off-by: Karel Zak <kzak@redhat.com>
script: fix a rare deadlock after child termination
script: fix spurious exit from input read loop on EINTR.