BUG: fix test error when ghostscript not installed

Confusingly checkdep_ghostscript returns a tuple rather than a bool, so
we need to check an element of the tuple to see whether ghostscript is
installed.  Put the test into a decorator in case we need it for another
test.
Merge pull request #3312 from matthew-brett/fix-ghostscript-skip

BUG: fix test error when ghostscript not installed