fix excessive search/replace changes
use extensionEnabled function
fix #639

Actually turns out to be an old bug. SetOptionDefault did not declare
the options array globally, so any default set during a script load did
not show up until the next load.