Correcting run directory for scripts