Polish up localize.py
Fix incorrect generation of PHP string constants

Avoid using double-quoted strings, since in PHP’s double-quoted strings
the dollar sign has a special meaning.