amlgrep: fix regex convert for BSD sed (on MacOSX)

also fixed strip_ctrl() function runtest.sh to use gawk insead of sed
because BSD sed always append '\n' at the end and breaks --color test.