stat module: mode is now returned as an octal and md5 call can be skipped.

Closes GH-6176

The only changed beyond GH-6176 are that we want mode to be octal rather then a new variable.

Tested with: https://gist.github.com/risaacson/bbce046e1b2f9b7d6435