Fix failing test when ghostscript is not installed.

* Hoisted the ghostscript detection into the EpsImagePlugin file from test_file_eps.py .
* Using it in test_imagefile.py