Add option to executing composer in separate directory

I'm using this as part of a packaging task, so I've added an option that allows changing the directory composer runs in. That way I can run composer in a build directory.