Add support for Context.MODE_APPEND in Context.openFileOutput.

Closes #1226.