fix: potential race condition in prefs writing

WriteStream.write is asynchronous.  It is possible for write to not complete before Firefox is launched.
Use fs.writeFileSync instead.