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
Removed library dependency on systemd.
Fixed a use-after-free and array-overrun bugs in lexer.c
These didn't seem to trigger problems on Linux, but resulted
in memory exhaustion on OSX.
Merge pull request #630 from dthain/makeflow-bugs

Makeflow Crash Bugs Fixed
Merge remote-tracking branch 'ccl/pull/627/head'

* ccl/pull/627/head:
  Removed library dependency on systemd.
Remove old tag.
Unified external_archives and external_dynlibs into external_libraries.
Modified library_search to return flags in a global variable,
so that they can be selectively applied.

Modified irods_ccflags and irods_ldflags so that they are only
used by the limited modules that need them.
Localized mysql build flags.
Extracted build flags for xrootd.
Factored out cvmfs build flags.
Factored FUSE flags to chirp module.
Factor out globus build flags.
Only apply fuse flags to chirp_fuse.
CXX flags = CC flags
Moved resource_monitor_visualizer inside resource_monitor.
Folded makeflow_linker into makeflow module.
Fixed minor link and install issues.
Whitespace.