Finish adding `from __future__ import unicode_literals` to all files

Now it's in all files except those in cmstestsuite/code/ and docs/.
Fix some remaining uses of open instead of io.open
Do not use explicit casts to str
Fix tests

They still thought testcases were identified by a number instead of a
codename.
Improve argument parsing

Don't fail on non-ASCII chars on Python 2 and uniform the syntax
(use a consistent parameter order, always give action, remove options
that were using default values).