py3: replace file() with open() in test-import-eol.t
file() is not present in Python 3.
This patch also adds b'' prefixes to make sure we write bytes in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2125
To run the tests, do:
cd tests/
python run-tests.py
See https://mercurial-scm.org/wiki/WritingTests for
more information on writing tests.