Fix Site#cleanup so as not to delete too much directories

* Fix written file enumuration to be recursive in Site#cleanup.
* Add new assertion and fix file lock problem in test.