catch IOError on Interrupted system call

if the script was interrupted using ctrl^c the script would log an
unknown exception and remove the current archive entry from the db
before actually exiting the script. This patch fixes this.