fixed parallelization of run_mg5 and gen_grid scripts