Fix bug 737: Can't overwrite empty directory.