Fix build tests and correct dependency information

We don't need to build dependencies on every single invocation; this happened because the phony target "dependencies" hid the real dependency information. Also fixed the build tests.