Adds support for pickling to different output targets (eg File), closes #5