Clean working directories when testing patching

The patching script can get wedged somehow by a cluttered
workspace. Make it do a 'git clean' to tidy things up
Merge pull request #4597 from PerilousApricot/bugfix/clean-for-patch

Bugfix/clean for patch