Add unit test for checking bad dependencies.

Some work on finding library(mypkg).