Add support for Python3 in FileCache, and a proper test.

I have changed the format of the file in `FileCache` from plain text to binary, so that is the way that Python3 `pickle` module works now.