Fix cp28386.

Add additional checks of the passed in mode.

I'd like some additional eyes on this one since it's a pretty fundamental part of IronPython (opening files).
Do we want to fail the same way as CPython on this? Currently the ccs stuff is being ignored in IronPython.