zulip_tools: Extract get_deploy_root function.
zulip_tools: Extract get_deploy_root function.

Modified by tabbott from the original to preserve the implementation;
see https://github.com/zulip/zulip/pull/11295#discussion_r254925032
for why this is correct.

Signed-off-by: Anders Kaseorg <087231934ba8fcf78bc142ce37d193b895ac03c4@mit.edu>

timabbott/zulip,kou/zulip,tommyip/zulip,showell/zulip,hackerkid/zulip,punchagan/zulip,rht/zulip,kou/zulip,tommyip/zulip,timabbott/zulip,brainwane/zulip,zulip/zulip,andersk/zulip,shubhamdhama/zulip,tommyip/zulip,rishig/zulip,punchagan/zulip,timabbott/zulip,brainwane/zulip,timabbott/zulip,showell/zulip,rht/zulip,brainwane/zulip,tommyip/zulip,synicalsyntax/zulip,eeshangarg/zulip,hackerkid/zulip,eeshangarg/zulip,punchagan/zulip,shubhamdhama/zulip,rishig/zulip,kou/zulip,punchagan/zulip,andersk/zulip,shubhamdhama/zulip,hackerkid/zulip,shubhamdhama/zulip,hackerkid/zulip,eeshangarg/zulip,tommyip/zulip,shubhamdhama/zulip,rht/zulip,showell/zulip,kou/zulip,zulip/zulip,rht/zulip,showell/zulip,brainwane/zulip,eeshangarg/zulip,synicalsyntax/zulip,rishig/zulip,rht/zulip,timabbott/zulip,zulip/zulip,showell/zulip,rishig/zulip,zulip/zulip,timabbott/zulip,hackerkid/zulip,eeshangarg/zulip,andersk/zulip,andersk/zulip,synicalsyntax/zulip,shubhamdhama/zulip,andersk/zulip,shubhamdhama/zulip,zulip/zulip,tommyip/zulip,rishig/zulip,synicalsyntax/zulip,synicalsyntax/zulip,synicalsyntax/zulip,synicalsyntax/zulip,rht/zulip,punchagan/zulip,tommyip/zulip,punchagan/zulip,kou/zulip,punchagan/zulip,rishig/zulip,rishig/zulip,andersk/zulip,kou/zulip,showell/zulip,kou/zulip,zulip/zulip,rht/zulip,eeshangarg/zulip,showell/zulip,hackerkid/zulip,andersk/zulip,eeshangarg/zulip,brainwane/zulip,timabbott/zulip,hackerkid/zulip,brainwane/zulip,brainwane/zulip,zulip/zulip