Prevent race conditions under t/tmp/, and descending into .git dirs

The find() call in t/99-policy.y descends into t/, which includes
t/tmp/, which is a directory in active use by other test processes.
This allows a race condition between when find() lists the
subdirectories of t/tmp/, and when it later tries to open a subdirectory
within it.  In the intervening time, the test responsible for the
subdirectory may have removed it, causing:

    Can't opendir(t/tmp/api-attachment.t-MQmEJUkg): No such file or directory

Prune the t/tmp directory and its contents, to prevent this race
condition.  Also prune any .git repositories which may reside within it,
such as the security test repository.
Merge branch '4.0/policy-race-condition' into 4.0-trunk