Fix test repo dir not deleted after running
tests: fix leak
Merge from 2660
Merge branch 'master' into swisspol