Fixed race conditions for FileEngine

As per: 
https://github.com/cakephp/cakephp/commit/4a7bd031e5b637fe0049ae9b569c284849f67c2f#commitcomment-4031746