build system: Avoid nul characters in build logs