Fix crash when compiling with -r

This fixes a crash in sc_attachdocumentation() where get_docstring()
returned an invalid string pointer because get_string() compared the
string index with list->size instead of list->length (the actual length
of the list).

Fixes #19.