Factor out some common stuff to jstests/dll/libs/runner.js