[JENKINS-17931] Cleanup temp files in case of an error

If errors arise, the temp files should be deleted
Merge pull request #25 from svogt/JENKINS-17931

[JENKINS-17931] Cleanup temp files in case of an error