Check dependencies by compiling spec into a script

instead of directly doing it.  The dependency checker script compiler
can be used for declarative runtime dependency checks as well.
Supporting custom dependency checks with *.test.sh