Fixes #4173: integrating patch of cfengine 3429 to allow the agent to purge folder on copy