Fix error where file.directory did not report changes
Fix #3282
Fix #3317

This fixes it for me @mou, can you double check?
Merge branch 'develop' of https://github.com/saltstack/salt into develop