Coverity fixes from Nelson
* merges:
CID:122 - NEGATIVE_RETURNS - Possible use of negative file descriptor
CID:123 - NEGATIVE_RETURNS - Possible use of negative file descriptor
CID:124 NEGATIVE_RETURNS - Possible use of negative file descriptor.
CID:125 - NEGATIVE RETURNS - Possible use of negative file descriptios
CID:135 - NULL RETURNS - Possible NULL pointer dereference
CID:182 - RESOURCE_LEAK - memory not freed inside Prolog_functions
CID:192 RESOURCE_LEAK - new argv is not freed
CID:226 SECURE_CODING - risky use of strcpy
CID:226 - SECURE_CODING risky usage of strcpy
CID:228 SECURE_CODING - risky usage of strcat
Fix last commit of CID:228 SECURE_CODING - risky usage of strcat
CID:230 SECURE_CODING - risky use of strcpy
CID:232 SECURE_CODING - risky usage of strcpy
CID:241 SECURE_CODING - risky usage of sprintf
CID:318 SECURE_CODING - risky usage of sprintf
CID:340 SECURE_CODING - risky usage of strcat
Added sxe-utils.h with several utilities from lisp.h
CID:475 USE AFTER FREE
CID:179 RESOURCE LEAK - free string in odd case