Fix UnicodeDecodeError observed in staging.
Fix UnicodeDecodeError observed in staging.

Serial corrupted output in log output files, cause reading files with a
specific encoding such as UTF-8 to fail. We should always use encodings during
file writes and apply a replacement if something couldn't be encoded during
file write, OTOH, do not specify any encoding during file reads which will help
reading the file contents as is and apply encoding heuristics as and when
required.

Change-Id: I78fc21b1a4c43d5346c3e0e916b5601b07217ab9

Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server