Fixed string escaping issues with digit(), tab(), etc. Improved
performance. Now users can pass in \ to methods and it will be escaped
(along with everything else).