py3: replace file() with open() in test-encoding-align.t...
py3: replace file() with open() in test-encoding-align.t
file() is not present in Python 3.
This patch also makes sure we write bytes in Python 3.
Differential Revision:
https://phab.mercurial-scm.org/D2131