core: revert when failing to export a template

When failing to export a template, the engine can attempt to delete
the already exported images.

Change-Id: I8d80c5d15f7321f67d54e7593cb2da1fd7186a25
Bug-Url: https://bugzilla.redhat.com/967628
Signed-off-by: Liron Aravot <laravot@redhat.com>
Signed-off-by: Tal Nisan <tnisan@redhat.com>