Improved unittst for ScratchDir modes.