Restore timeout checking logic

Because of this -

mx:~# bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

mx:~# read -r -t 1; echo $?
1