Bug fix for restoring permissions on empty directories.