Add test for issue #491
Remove useless /g flag on regex
Make sure strings match along lines

This is redundant for most usages of ack, but fixes
a bug when using -l