Fixed makefile silliness
Fixed missing and incorrect ffi linkages
Added missing declarations
Fixed  memory problem with wordexp, renamed the *wordexp_array things to *string_array