First attempt at handling writes to a locked metadata file

Please see https://github.com/LightBlueProject/LightBlue/issues/5
As this type is not IDisposable no cleanup logic is run to delete this directory.