Use a shellscript to drive the checking

Avoids problems with the makefile.