Backporting overwrite() from 3.0 to 2.6.

Backport https://github.com/cakephp/cakephp/issues/3183 to 2.6
Gonna love it :)


Note: CS Tests in travis break due to not yet merged hotfix https://github.com/cakephp/cakephp/commit/1d1a2f859c7dd0434e29524a48a573f3e0afe889