Only store the last built branch after a successful cleanup

If lunch or clean failed, the next build would proceed as if the tree
is ready for this branch, which isn't necessarily true when there's
a cleanup failure