[ysh] Handle IOError from readline()