Add $ and ^ to list of characters to escape in regex.

The escape_string method did not include ^ and $ in the list of
characters to escape. This caused append_if_no_line to possibly add
lines with a dollar sign in them many times even after they have been
added.

Fix issue #14.