Make the 'check' target recognize when unit tests have failed.

This required making a new target check-targets which builds the demoncore without running it.