tests: Use a unique name for test directories.

Even if the tests run in parallel (make -jN check) we should not stomp
each others test directories.  Therefore create test directory names
using 'mktemp -d'.

Also: Use 'rm -rf' instead of 'rm -r' since it doesn't really matter
whether we remove these temporary directories successfully or not.