gracefully handle deleted docs in pillow retry

http://manage.dimagi.com/default.asp?150473