Use var_export when writing configuration to avoid strange use of add/stripslashes. Fixes #2166.
Merge pull request #2167 from psychoticmeow/config-fix

Use var_export when writing configuration. Fixes #2166