Allow view patterns in the generated code
Fix a bug in writeFileEncoding/writeFileUTF8
Add tests for writeFile/readFile pairs