moving some shared code into h2o_cmd.py so more tests can use common
update