Moved some common yaml parsing code out of tokenizer test runner