Fix pickle for Dataset objects

Fixes #167

Related: #166 (though I'm not sure why that didn't work)