Fix a race condition problem

I've fixed #3857.

And I am sorry. I didn't know my commit was notified to upstream automatically. 
I shouldn't have done force-push.
C:\var\www\cakephp.dev\httpdocs\lib\Cake\Test\Case\Model>phpcs --version
PHP_CodeSniffer version 1.5.3 (stable) by Squiz (http://www.squiz.net)