Add support for constant functions in tabsign.

Also improve some tests.
[Framework] If no line, is provided, edit file at first line.
Fix encoding declaration of several source files.
Add tests for file encoding.