Fix unescaped left braces in regexes in tests

They cause deprecation warnings in perl 5.21.x.