We define this option as 'X'. There are three places needed to be updated.

In main() function:

1. Add one item in static struct option long_options_run[] = {}
	 {"change_directory", required_argument, 0, 'X'},

2. Also add this 'X' in const char *option_string_run
	 const char *option_string_run = "aAB:cC................................X:zZ:";

3. Add the definition of option 'X' in switch statement.
	 case 'X':
	 chdir(optarg);
	 break;

And the 'X' option will work as this: makeflow -X foo Makeflow
Continued editing on makeflow_chdir_added
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.