Port 9452d5e1b6d0eec733b00e091933d51c10bd460e from cakephp/cakephp
Port 9452d5e1b6d0eec733b00e091933d51c10bd460e from cakephp/cakephp

Harden the `bin/cake` script to avoid breakage when local shell
environment has a `CDPATH` set.

makallio85/fish-diary,QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp,QoboLtd/project-template-cakephp,ojengwa/cake-appengine,QoboLtd/project-template-cakephp,ojengwa/cake-appengine,makallio85/fish-diary,QoboLtd/project-template-cakephp,makallio85/fish-diary