Updated pickle reader and added a test.