Fixed a bug where a stack reallocation could lead to a crash when persisting threads. Closes #10.
Fixed an index in the debug 'path' being incorrect.