Python Write File With Encoding