Fix bugs in scheduling simulator. Also add -robustroot setting in Tests/dotest script