make sure that we don't try to access an already deleted files, fixes some file source not found warnings
correctFolder() already resolves the dirname internally
use better coding style
Merge pull request #6099 from owncloud/fix_source_not_found_warnings

make sure that we don't try to access an already deleted files