file state test fixes
file state test fixes

- fix integration.states.test_file.FileTest.test_managed_latin1_diff
- fix integration.states.test_file.FileTest.test_recurse_issue_40578
- fix some issues integration.states.test_file.FileTest.test_issue_8947_utf8_sls,
  this test still fails due to py2 popen's unicode handling.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt