Improved test line matching
Mavericks compatibility