Use refcounts to decide when to delete a file