Fix odd parser errors when entering junk and clean up exceptions.

We just needed to flush the input stream upon a parse error.