Fix escaping of single quote. Closes #307, updates tests.
Merge pull request #308 from strk/aposquote

Fix escaping of single quote.