Fix images/scripts/filter-output encoding
With old python versions, filter-output was having problems encoding the logs with some non-standard chars.
Setting PYTHONIOENCODING fixes this problem for sys.stdout.write and calling open() with encoding='utf-8' fixes the output.log file writing.
Fixes: #175 (closed)