Fix file deletion for non-empty directory.