Use the much faster reverse_readfile instead of reverse_readline.
Automatic Py3k merge for testing