add option for changing directory before executing

Useful for changing into application directory for instance