[BUGFIX] File PackageStates.php isn't created at all

With the patch I71bba56361a4cc85fb253199acbfee5829defa29 the access to
the PackageStates.php file is checked. If the file doesn't exists yet
the error is thrown as well. This patch adds a test if the file can be
created so the update process can be executed again.

Resolves: #53410
Releases: 6.2
Change-Id: I1e79c7f0ab0f0c69a20086c8b8e5be2c37bdb5f3
Reviewed-on: https://review.typo3.org/25194
Reviewed-by: Wouter Wolters
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind