Throw RuntimeExceptions on json en/de-coding errors.
Added config option file_encoding.

Without this option json_encode would break for Code that is not UTF-8 encoded.

Iconv will be called before parsing the php files, so everything inside sami
should always be UTF-8.