ghostscript: modernize
ghostscript: add test

Closes #35302.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>