[tests] Do not produce temporary test results in source directory

This avoids to dirty the source tree. Create the test files in the target/ directory and make sure their names are easier to identify.

My tests fail before and after this change, so this only improves the situation. Will have a look at the reaon for the fails later.