Handle escape characters in search string properly

Fixes #140