check if the parent folder is updatable instead of the file

check if the parent folder is updatable instead of the file because touch() is also used to create new empty files.

Fix broken "create new file" operation.

cc @DeepDiver1975 This works for new files creation and should still solve issue #2792