Add helper functionality to test ‘shutil.rmtree’ behaviour.