Fix UnicodeDecodeError on build.py