update tools script to make sure master is synced to remote before the gh-pages update