I think that would be a good idea. Even if users get errors complaining the file is locked that would be better than the forum going offline until the admin fixed it...
One alternative method I have seen used is to write the new contents to a temporary file, then rename it over the existing file. This allows multiple simultaneous writes and reads, won't throw any errors, but isn't as accurate as locking since "last edit wins".
The locking solution will only work if every developer use them (eg: only using AppendToConfigurationFile to edit a config file). It doesn't prevent an extension to write or read a locked file if it doesn't check for the lock.
The "last edit wins" is not problem when some use a config file for a counter; it won't be accurate but it shouldn't be used for that. Could it be a problem if 2 requests try to set the default settings of an extension at the same time or updating the db schema at the same time?