Handle abort correctly during installation

bnc#893638
This should go to the test helper.