Split out test linking into a separate phase, and fix the output naming convention for tests