Replace mode with octal renaming to mode.

Closes GH-6176

This way for mode we return in an octal format which is immediately usable compared to transforming it later.
Typo fix.