update set_config_values for comments and sanatize regex 

Updated set_config_values to:
- correct the RHS if the LHS value exists, else
- uncomment LHS if it doesn't exist in the file and is commented out only once, else
- insert the LHS RHS if it is commented out more than once, locate after the commented LHS, else
- insert the LHS RHS

Also sanatize the RHS for the regex since it could contain special characters.