Fix scripts so that they run to completion on the ubuntu box
Fix other stuff mainly to do with the builder