Config file locking and lock waiting.
config file locking
config file locking
Merge pull request #667 from Gravecorp/master

config file locking