Add dir_mode for file.managed

Refs #7860
Integration testing for file.managed dir_mode argument.

Added documentation for dir_mode to file.managed.
Merge pull request #8325 from cachedout/#7860

Add a dir_mode to file.managed