This commit fixes a bug so that local work files are removed when
not needed.