Tests that expect errors check error codes. Fixes issue78
Merge pull request #173 from pbouianov/issue78

Tests that expect errors check error codes. Fixes issue78