Implement clean-dir workaround

This weird ordering ensures that directories marked Clean do not clean up
files 'required' by them even though this is backwards logic. The 'makedirs' handles
the need to have the directory created beforehand.
Merge pull request #3 from ministryofjustice/clean_dir_hack

Implement clean-dir workaround