Fix #7161 by only refreshing when needed.

Check to see if the sortDirectoriesFirst has actually changed before refresh.
Whitespace update
Merge pull request #7162 from adobe/dangoor/7161-specrunner-exception

Fix #7161 by only refreshing when needed.