Check if the local node already exists before saving locale properties.

...locale properties were saved without checking if the locale node already exists.