While this wasn't likely to cause any problems in practice, using the sub-command "build --split-platform" with a platform containing any characters that need escaping would have produced a TOML with invalid syntax. Add a utility function that's guaranteed to create a valid TOML string.