Fixes issue #4747 - FileGenerator now properly generates files.
cleaning up var_dump
adding test case for appending to File as this is documented
coding standard fix
Merge branch 'hotfix/#6302-fix-#4747-file-generator-properly-generates-files'

Close #6302
Close #4747