Replace PYTHON_MODES with the more aptly named PYFITS_MODES since they map special named file modes used only by pyfits to their OS-level counterparts.
Removed most references to the 'copyonwrite' mode, which for some time has been identical in behavior to 'readonly'.  The mode is still supported but only for backwards compat.
Fixed an apparently long-standing typo in the fileobj_closed utility function
Fixed another long-standing minor issue where the filobj_is_binary() utility function always return False on pyfits.file._File objects, even though it's required by definition to wrap a file opened in binary mode.  This solution is a hack but it'll do for now.
* Added the updated file mode normalization that can detect whether a
 file was opened in append mode (in general case, where 'a' is the mode
 string this is trivial, but the io.FileIO class has a bug that leaves
 'a' out of the mode string even if the file is in append mode.
* Offloaded repetitive handling of guessing the appropriate pyfits mode
  from file objects, and of handling overwriting existing files to the
  _File class.
* While I was at it, fixed handling of open ZipFile objects to work the
  same way of passing in a zip file by filename.
* Added some new tests to confirm the consistency of the file mode
  handling.
Fixed an issue on Windows where an IOError wasn't raised in the same place as on *nix systems when opening non-existent files for reading; included a unit test.
Added a changelog entry for the file I/O updates and included as a regression test the example that started all this work--it now passes as expected.