Dialyzer fix

Hey,

You may want to review these patches for emagick, but the dialyzer fix in 7672173 shuts up the dialyzer. Feel free to cherry-pick it. The other patches improves emagick so we could use it for what we want to do.