Moved the mod_deploy directory creation before the delete task as that will fail if the directory does not exist.