Swapping order of save and cleanup functions. Saving takes a long time,
and I want to be back in Matlab's command window ASAP in case anything
breaks.