[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/23303
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters