Don’t lock globally when file changes occurs

Fixes potential problems where multiple files are changed at the same time or with plugins that are really slow.

Refs #235