Fixed creating settings files when target dirs don't exist