Added extra check to avoid deleting key folders

Whenever a delete operation is called twice in a row, it could happen
that the first call already deleted the file.

The second call would return an empty $ownerPath because the file does
not exist. That empty $ownerPath would run the key deletion operation on
the wrong path.

This fix adds checks in many places to make sure we don't use $ownerPath
when it's empty or null.
Merge pull request #11186 from owncloud/trash-fixdoubledeleteracecondition

Added extra check to avoid deleting key folders