clean up work directories if createrepo/createrepo_c dies

Bug: 1101402
Change-Id: I459daf2f1a018f7a7ff60e4dda28e21eabbea90d
Merge branch 'release-0.16' into develop