Fixes evanmiller#146 by checking for "ERROR" output.

See evanmiller#146.