Fixed test_config_option on Windows

test_config_option was failing on Windows because it’s
not easy to write to a tempfile and also read from it in
Windows.

Solved with the approach from this SO answer:
http://stackoverflow.com/a/15259358/25625
(Other tests already used this pattern.)