Fix base 2 logarithm test script for PCRE

This works around what appears to be a strange bug in PCRE, which, in "-o" mode, outputs black extra lines for some regexes and not others.
Improve base 2 logarithm test script for PCRE