composer: create directory if it does not exists

may happen if yii is installed globally.

fixes #6402