Avoid non-ascii characters in project templates

Using tr to substitute non-ascii characters for metachars was unreliable
and buggy under UTF-8 shells. Among other things, this caused the 'test'
target in new projects to fail due to a missing question mark in a query.
Instead, use some longer strings and change from tr to sed accordingly.