Implement -o flag to change output directory.