Use bytes instead of string in test_pickle.

This is needed to pass the test with python3.