Re-ordering web2py tweaks to follow git_refresh

These operations require the latest opentree repo to work properly (otherwise they might write stale data, or fail entirely).