Back-patch to v11, where commit
90627cf98a8e7d0531789391fd798c9bfcc3bc1a
made the GNU make build system do likewise. Without this, when a
typical PostgresNode-using test failed, subsequent runs bailed out with
a "File exists" error.
use File::Basename;
use File::Copy;
use File::Find ();
+use File::Path qw(rmtree);
use Install qw(Install);
$ENV{TESTDIR} = "$dir";
+ rmtree('tmp_check');
system(@args);
my $status = $? >> 8;
return $status;