Could I make another feature request? Rather than overwriting the pref.js file, could the tor-switch script leave unchanged all settings other than the ones that it needs to modify? Shouldn't be too hard using scripting tools grep/awk/sed, or even as a starting point, it could save the file when starting tor and restore it when stopping tor.