The reason is, that I want to use the function create_setting in my create_local_settings script. I want to give the function as less data as possible. To send the path to three files three times seemed redundant. Specially when this files are always (unix, windows, portable) in the same directory.

It is not a good praxis to write the same code with small differences over and over again. It is much better to abstract the code and write it once. Your old code had three times nearly the same line and I would have to write the same lines in my script.