[test runner] Guard against \r characters in regexp

Issue #164