Split FITSImageTest.random() into two class methods
Swap x and y values of the size in numpy.random.random_integers()

The shape of the matrix of random integers that is created with the
numpy.random.random_integers() function must be (y, x), not (x, y).
In other words, the number of columns of the FITS image must be given
first, because PyFITS indexes pixels by column rather than by row.
Make the FITSImage.header instance variable private
Fix two exceptions incorrectly raised by FITSImage.__init__()

There are two scenarios in which FITSImage.__init__() does not raise
the appropriate exception. On the one hand, when the 'SIMPLE' keyword
is missing from the primary header of the FITS file, NonStandardFITS,
instead of NonFITSFile, should be raised. On the other hand, we raise
this exception, NonFITSFile, when the file is not readable, but the
proper one is IOError.
Improve docstring of FITSImage.__init__()
Add unit test for FITSImage.__init__()
Remove unused import
Do not redefine the built-in 'str' type
Use specific error messages when NonStandardFITS is raised

Instead of merely stating that a FITS file "does not follow the FITS
standard" when the NonStandardFITS exception is raised, explain what
is wrong in the error message: (a) the value of the 'SIMPLE' keyword
may not be 'T' or (b) the keyword may be missing from the header.
Rename FITSTestImage class to FITSImage

Use the same name for the subclass of fitsimage.FITSImage. There is no
room for confusion here, because of namespaces, and in turn this makes
the unit tests clearer: we can use the FITSImage class transparently,
after having subclassed it locally in order to add the __enter__() and
__exit__() methods.