Also fixed a recursive lock error in some configurations, and replaced a usage of strcpy() with strncpy().
This helps debug some multithreading issues.
Telodendria doesn't use this library yet, but it will soon.