Fix some syntax and other minor breakages on Python 2.5--this changeset should not be ported to Astropy

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