Add parameter for setting output directory.

Add parameter for setting output directory.