Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs

Add the PRE_BUILD step to all targets that need it so the output
directories get created no matter which target is built first.
Merge topic 'fix-CTestTestMemcheck-xcode2-missing-dirs' into next

27b81213 Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs