Checked for null options on writeFile and readFile. Issue #6090
Merge pull request #6194 from klbinns/6090fileRWoptions

Checked for null options on writeFile and readFile. Issue #6090