Makeflow chdir update, after rebasing

After rebasing, this is the latest update of the makeflow chdir option.
To ignore the chdir in some cases, we should do the chdir after those cases.
In main function, only logfile, dag_run, and dag_clean are placed after the chdir. Their results will be written to the new directory.
The other options' outputs, such as debug.o, will be remaining at the current working directory