Use pickle protocol 2.

This ensures that pickles written by Python 3
can be read by Python 2. Also ensure that we always use
binary mode - this makes a difference in Python 3.
__future__ imports must come at the very start of the file.
Fix syntax error.