Escape search queries to allow special characters

Also adds some basic feature specs for output search.