Improved tests to actually check error messages
I noted that the tests only checked that the return value from a failing make
command was 2 as opposed to checking that the actual failure was the correct one. This caused some tests to pass when they should have failed.