Split setPropertiesValue in two to make it generic

This will allow us to write key/value pairs to other files.