Small improvements to handling of file rename/delete.