Adding restart functionality on ROOT.war upgrades

Also cleans work and temp when upgrading/downgrading ROOT.war