Replaced 'echo' with 'printf' in generation of switches for test.

'echo' doesn't distinguish between options and arguments,
so in cases like 'echo "-e"' is outputs empty string. It
results in dropping re2c's "-e" flag in tests with names
like "test.e.re".
Fixed bugs introduced by UTF-8 support (commit 28ee7c95bca46ad3cdb965741c5c29e21c50df14) and added tests that revealed them.

Bugs:
1) dot broken in EBCDIC mode
2) ranges that have 1-2 symbols (without "-") considered empty