Add patch405 wrote by Anssi to fix check of writeables files when folder is not available (mga #3601, #3943, kde review #103577)