Minor cleanup to remove duplication in argument handling in read-config-str, and test for write-config