Raw string writing into file; autolocking pattern

> A number of methods used the same pattern of doing something in the
> context of autolock present or not. This commit exposes this pattern
> and makes it reusable.
> Additionally a method is available to write a string directly to the
Memory-Mapped file and a corresponding read method. An additional test checks this functionality.

Would be nice if this function would be available directly in the gem - Background: I am using this library to exchange data with a .NET process; That one doesn't have a clue about the way hte hash is serialized into the file, so a possibility to enter raw string input is maybe not so bad.