Generalized pickle dump/load