Fixed race conditions for FileEngine
Merge pull request #1617 from davidsteinsland/master

Fixed race conditions for FileEngine.

Using file_exists() and unlink() together does not ensure atomic results.