Use a transaction when creating an artifact.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>
Ah, that's something I wondered about. Why do we manually call `tx.Rollback()` on `err != nil` then?