Fix issue with using contain() and query[contain]

When contain() and query['contain'] = array(...) were used together
the query['contain'] values where not respected.

Fixes #3287

Conflicts:
	cake/libs/model/behaviors/containable.php
Fix cake shell script to run properly on macos.

Fixes #3323