Delete documents created by libkis directly
Otherwise you will have to wait until the even loop kicks back
in before the images are really deleted, and that only happens
after the script is done running.
CCBUG:412740
(cherry picked from commit 543565e9cb5d1ddd8fd46bbd65e98e46d059a507)