[BUGFIX] Show flash message if package states are not writable

When trying to install/uninstall an extension and PackageStates.php
is not writable, an error flash message is shown.

Resolves: #53077
Releases: 6.2
Change-Id: I71bba56361a4cc85fb253199acbfee5829defa29
Reviewed-on: https://review.typo3.org/24975
Reviewed-by: Steffen Müller
Tested-by: Steffen Müller
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind