script: don't wait for empty descriptors if child is dead

The current code waits for empty file master and slave descriptors,
but it makes sense only if there is child process that cares (read)
about data in the descriptors.

Signed-off-by: Karel Zak <kzak@redhat.com>
script: fix inconsistent -q, use poll() rather then O_NONBLOCK

 - don't suppress "Script done" message in typescript file by -q
   (note that -q has no effect to "Script started" message)

 - simplify the code by poll()

Signed-off-by: Karel Zak <kzak@redhat.com>
script: use all-io.h to make the code more robust

Signed-off-by: Karel Zak <kzak@redhat.com>