Fixes spacetelescope/PyFITS#28 by backporting the fix from Astropy. As far as I can tell I don't have a ticket for this issue open in Trac--I thought I had fixed it a long time ago before it came up in Astropy.

Conflicts:

	CHANGES.txt
	lib/pyfits/util.py


Conflicts:

	lib/pyfits/util.py

git-svn-id: http://svn6.assembla.com/svn/pyfits/branches/3.0-stable@2247 ed100bfc-0583-0410-97f2-c26b58777a21