adding argument deleteSelf - if false the directory itself will not be deleted only it's content
adding repair step to clean the asset cache after upgrade + coding style adjustments