Handle errors if wgetch returns ERR

This should prevent going into an infinite loop trying to read from the
user if they go away.