Don't proceed with file operations when we know the file doesn't exist

Fixes issue 2448.
Merge pull request #547 from kacfengine/issue-2448

Don't proceed with file operations when we know the file doesn't exist