Checkpoint: Fix broken checkpointing functionality
Checkpoint: Fix broken checkpointing functionality

This patch fixes the checkpointing by ensuring that the directory is
passer to the scriptCheckpoints function, and that the num_checkpoints
is not used before it is initialised.

samueldotj/TeeRISC-Simulator,gem5/gem5,joerocklin/gem5,yb-kim/gemV,gem5/gem5,zlfben/gem5,zlfben/gem5,gem5/gem5,sobercoder/gem5,gem5/gem5,Weil0ng/gem5,powerjg/gem5-ci-test,cancro7/gem5,kaiyuanl/gem5,aclifton/cpeg853-gem5,HwisooSo/gemV-update,aclifton/cpeg853-gem5,zlfben/gem5,HwisooSo/gemV-update,SanchayanMaity/gem5,zlfben/gem5,TUD-OS/gem5-dtu,Weil0ng/gem5,aclifton/cpeg853-gem5,austinharris/gem5-riscv,markoshorro/gem5,kaiyuanl/gem5,yb-kim/gemV,samueldotj/TeeRISC-Simulator,Weil0ng/gem5,TUD-OS/gem5-dtu,joerocklin/gem5,powerjg/gem5-ci-test,gedare/gem5,kaiyuanl/gem5,TUD-OS/gem5-dtu,zlfben/gem5,SanchayanMaity/gem5,rjschof/gem5,rjschof/gem5,briancoutinho0905/2dsampling,HwisooSo/gemV-update,HwisooSo/gemV-update,sobercoder/gem5,rallylee/gem5,briancoutinho0905/2dsampling,austinharris/gem5-riscv,powerjg/gem5-ci-test,austinharris/gem5-riscv,KuroeKurose/gem5,cancro7/gem5,gem5/gem5,rjschof/gem5,HwisooSo/gemV-update,qizenguf/MLC-STT,markoshorro/gem5,gedare/gem5,zlfben/gem5,joerocklin/gem5,TUD-OS/gem5-dtu,rallylee/gem5,samueldotj/TeeRISC-Simulator,cancro7/gem5,yb-kim/gemV,gedare/gem5,briancoutinho0905/2dsampling,qizenguf/MLC-STT,TUD-OS/gem5-dtu,kaiyuanl/gem5,KuroeKurose/gem5,samueldotj/TeeRISC-Simulator,qizenguf/MLC-STT,yb-kim/gemV,kaiyuanl/gem5,gedare/gem5,austinharris/gem5-riscv,cancro7/gem5,rallylee/gem5,gem5/gem5,aclifton/cpeg853-gem5,rallylee/gem5,rjschof/gem5,briancoutinho0905/2dsampling,joerocklin/gem5,sobercoder/gem5,powerjg/gem5-ci-test,KuroeKurose/gem5,KuroeKurose/gem5,rjschof/gem5,SanchayanMaity/gem5,cancro7/gem5,KuroeKurose/gem5,SanchayanMaity/gem5,rallylee/gem5,TUD-OS/gem5-dtu,qizenguf/MLC-STT,KuroeKurose/gem5,sobercoder/gem5,powerjg/gem5-ci-test,SanchayanMaity/gem5,austinharris/gem5-riscv,rallylee/gem5,joerocklin/gem5,samueldotj/TeeRISC-Simulator,sobercoder/gem5,kaiyuanl/gem5,powerjg/gem5-ci-test,cancro7/gem5,Weil0ng/gem5,rjschof/gem5,SanchayanMaity/gem5,markoshorro/gem5,sobercoder/gem5,sobercoder/gem5,markoshorro/gem5,gedare/gem5,briancoutinho0905/2dsampling,markoshorro/gem5,TUD-OS/gem5-dtu,SanchayanMaity/gem5,rallylee/gem5,qizenguf/MLC-STT,joerocklin/gem5,gedare/gem5,yb-kim/gemV,HwisooSo/gemV-update,samueldotj/TeeRISC-Simulator,Weil0ng/gem5,zlfben/gem5,Weil0ng/gem5,samueldotj/TeeRISC-Simulator,austinharris/gem5-riscv,markoshorro/gem5,Weil0ng/gem5,joerocklin/gem5,rjschof/gem5,gedare/gem5,powerjg/gem5-ci-test,markoshorro/gem5,yb-kim/gemV,briancoutinho0905/2dsampling,kaiyuanl/gem5,KuroeKurose/gem5,briancoutinho0905/2dsampling,qizenguf/MLC-STT,aclifton/cpeg853-gem5,gem5/gem5,cancro7/gem5,yb-kim/gemV,HwisooSo/gemV-update,joerocklin/gem5,austinharris/gem5-riscv,yb-kim/gemV,aclifton/cpeg853-gem5,aclifton/cpeg853-gem5,qizenguf/MLC-STT