Added checkpointing pickle code to pretraining script for SdA, and added offset as an optional argument for extract_datasets in utils/extract_datasets