Check that test prog. compiled before declared found

The previous version did the test and setting of the config variable
right, but reported that the module was found only if the files were
located, independently of the result of the compile.
Merge pull request #169 from rolk/169_havetest

Check that test prog. compiled before declared found