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
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
continued editing on makeflow chdir option
have elimiated the chdir_mode variable and elimiated initializing change_dir as NULL.
Update link_readline closing issue #560
All uses were consistent with the actual behavior, so I simply
changed the docs to correspond to the implementation.
update the makeflow man page.
add the chdir option in function "show_help" in makeflow.c
Merge pull request #626 from kangkangli/makeflow_chdir_new

Makeflow Change Dir Option
Change the method of spliting `chirp` cmd into args from string_split to string_split_quotes.
Merge pull request #633 from hmeng-19/chirp_script_space

Change the method of spliting `chirp` cmd into args
Use prefer static fuse rather than dynamic.

cvmfs is being compiled with the static version.
Merge pull request #635 from btovar/static_fuse

Use prefer static fuse rather than dynamic.
Fix wrong int cast in expire_procs_running
Use uname -m instead of sys when looking for packages.
Addition of makeflow apps and wrapper from paper submission
Added Galaxy Folder for wrappers and filetype descriptor
Slightly clarified cctools.py
Modified for new tool paths
Added install shell and perl scripts to modify tool_conf and registry for datatypes
Slight change
Finalized install commands
Finalized install commands w/GATK