C string safety in TYPEget_ctype / TYPE_get_ctype

Check string lengths, only copy if necessary

found due to an OSX segfault - the static char[] retval was getting copied into itself due to recursion

    frame #4: 0x00007fff92da1860 libsystem_c.dylib`__chk_fail + 48
    frame #5: 0x00007fff92da1870 libsystem_c.dylib`__chk_fail_overlap + 16
    frame #6: 0x00007fff92da18a1 libsystem_c.dylib`__chk_overlap + 49
    frame #7: 0x00007fff92da1a6c libsystem_c.dylib`__strcpy_chk + 64
    frame #8: 0x0000000100013a98 exp2cxx`TYPEget_ctype(t=0x0000000101a580e0) + 280 at class_strings.c:56