Changes reference counts after recovering log.

Fixes issue 164, in which makeflow would not collect files when
re-running the workflow with gc.