fix 2htdp/image for text-only mode and add a test case that
covers improvements from 8fb8f56