closes #36: factor out the code to find ImageMagic/GraphicsMagic