[BUGFIX] Only log file/directory actions which were done

Some file/directory actions were logged as they were
successfully performed, even when they failed.

Resolves: #51328
Releases: 6.2, 6.1, 6.0

Change-Id: Iab03e668d3f7d0e8feec09851ea50a59ab4b71a0
Reviewed-on: https://review.typo3.org/23390
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters