networkd: Create config directory before writing config
networkd: Restart networkd twice to work around race

https://bugs.freedesktop.org/show_bug.cgi?id=76077