Fix being unable to set the right permissions for kde_settings.conf

Authored by filipf on Feb 13 2020, 11:47 PM.

Description

Fix being unable to set the right permissions for kde_settings.conf

Summary:
If we are creating a config file and its directory doesn't exist, we fail to set the right permissions for the file.

This affects kde_settings.conf and results in the KCM not being able to read stored settings.

BUG: 414396
CC-BUG: 342722
FIXED-IN: 5.18.1

Test Plan:
rm-rf sddm.conf.d
save settings in the kcm in various ways
kde_settings.conf is now world readable agian

Reviewers: davidedmundson

Subscribers: plasma-devel, ngraham

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D27388