Build detour & nettle only once (if needed).
Fix listing of items (un)locked.

Problem was of the form 'sprintf(buffer, "%s…", buffer, …)'.
Revert "Build detour & nettle only once (if needed)." – too soon for this.

This reverts commit 8559f173f1b8d80b5c09fb6122ba83ae7e70df75.
The cmake feature used in this commit was added in cmake 2.8.8.
Unfortunately, travis uses an older version.