MDLSITE-2009 improved the update script

* Now conditionally updates things.
* Is safe to run over and over again
MDLSITE-2009 missing branches now created during execution