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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2282 ed100bfc-0583-0410-97f2-c26b58777a21
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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2283 ed100bfc-0583-0410-97f2-c26b58777a21
Fixed an apparently long-standing typo in the fileobj_closed utility function

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2284 ed100bfc-0583-0410-97f2-c26b58777a21
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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2285 ed100bfc-0583-0410-97f2-c26b58777a21
* 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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2286 ed100bfc-0583-0410-97f2-c26b58777a21
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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2287 ed100bfc-0583-0410-97f2-c26b58777a21
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.

git-svn-id: http://svn6.assembla.com/svn/pyfits/trunk@2288 ed100bfc-0583-0410-97f2-c26b58777a21