Fix file_test on Python 3