Merge pull request #10420 from s0undt3ch/2014.1

2014.1 Cherry-picks
Changing zfill(3) to zfill(4) so that we get '0700' instead of '700'

There is a possibility of this causing regressions, it will work correctly where both params are passed through it or where it's being compared with stat() output.  If there is code expecting a '700' style permission it will fail.  Realistically, '0700' is correct so the other code needs to be fixed.

Conflicts:
	tests/integration/modules/config.py
Attempt to correct test failing due treating 0755 as octal but passing it as decimal.
int comparison rather than string comparison of octal values; zero padding on one but not the other caused spurious mismatch
Removed the mock for config.manage_mode which doesn't seem to be necessary
for any tests to pass but was causing most of the failures for my previous
commit.

Coerced several values to string representations of octal where before they
were sometimes strings and sometimes ints.
I realized that the coercion to oct string I was doing was incorrect.

>>> oct(int(str('744'), 8))
'0744'
>>> oct(int(str(744), 8))
'0744'

The second should be '1305'.

I just went ahead and made the coercion very explicit with an if switch.  I
verified that all the unit tests and the previously affected integration test
succeed.
Ensure a leading zero on the string.
Revert "I realized that the coercion to oct string I was doing was incorrect."

This reverts commit 8cd50a92ea913b05327b8291da3d2164993e726e.
Revert 'Coerced several values to string representations of octal where before they
were sometimes strings and sometimes ints.'
Revert 'int comparison rather than string comparison of octal values; zero padding on one but not the other caused spurious mismatch'
Use a string version of the mode.
Normalize stats()['mode'] for safety.
Expand tests for manage_mode
Restore MagicMock as it shouldn't cause any issues.
Pylint fixes
Tell PyLint not to complain about ignored files