Add `errorHasOccurred` function
Add `errorHasOccurred` function

This function detects from `status` whether an error has occurred
in the test runs.
NOTE: in the previous part of this branch, this functionality was
broken!

matlab2tikz/matlab2tikz,PeterPablo/matlab2tikz,RPeschke/matlab2tikz,egeerardyn/matlab2tikz,nidrosianDeath/matlab2tikz,egeerardyn/matlab2tikz,LJeub/matlab2tikz,miscco/matlab2tikz,matlab2tikz/matlab2tikz