Additions to state file.py

Giving the file.directory option the ability to ignore files or directories when recursively setting the ownership, group ownership and permissions.  Per #14795