#4030 Config edit escape sequences

`npm config edit` previously did not emit a valid `ini` file.  This patch ensures that the file opened on `npm config edit` is valid.

Closes #3782