Metadata jackets: Use a safe formatter

Metadata jackets: Do not error out when using a custom template with
some custom fields that are not present. Fixes #1225357 [polish fails when adding jacket to epub](https://bugs.launchpad.net/calibre/+bug/1225357)