Fixed MIME type truncation on embedded images

Except for png, the data URIs for images were being written like data:image/mp, data:image/pg, data:image/if instead of bmp, jpg, gif. Not sure if this is the most nim-proper way, but it works.