[tests] Import executeCommand() from lit.

 - This is duplicating a small amount of code, but I don't want to consider
   lit's TestRunner module as part of its public API.