finally got deleting of empty scratchpad dirs to work