Fix a bug where if OPENAPPEND couldn't read the file, it threw an error but still opened the file with an indeterminate encoding.
Now it throws an error and doesn't open the file.
Authored by: david_costanzo 2020-07-03
Parent: [r5328]
Child: [r5330]