Escape source strings before using in re.sub

Fixes #14