added support for scan pkg dir
added compilation of test executables

by default, test execs are compiled, too there is an option to skip test