Issue #16826: Don't check for PYTHONCASEOK when using -E.

This commit fixes a regression that sneaked into Python 3.3 where importlib
was not respecting -E when checking for the PYTHONCASEOK environment variable.
Issue #16826: Revert fix while Windows issues are being worked out.
Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened.
Patch by Erik Bray.