Fix bug #7996 - sgid bit lost on folder rename.