Added file-locking to interface

Now, the interface is thread-safe using lockfile. It is included in
documentation, and also a warning is issued when the module is not
available or could not be imported.