Fix dependency for building models.  Also, make sure to create the output directory.
Make the unit test cmake file structures more "cmake like", ie, push more CMakeLists.txt down.
Also, needs to be both CXX and C project due to pthreads dependency.