in reply to Environmental Settings

I imagine that the initialization step sets environment variables or otherwise alters the environment for the next commands. However, the environment only lasts for the current shell, and each system command opens a different shell. Therefore, any alterations to the environment made by the first command will not be seen by the second. You could try putting all the commands in a single system:
system("/PATH/initialize_system; /PATH/skew.k ARG_FOR_FRAME_NUMBER;". "/PATH/savegif.k FRAME_NUMBER; exit");
That way they all get executed by the same shell. Don't forget to check the return code of system. See its documentation for the proper way of doing it.

On second thought, it looks as if the initialize_system command starts a new shell, within which you execute the other commands, right? If this is the case, the above will not work. You could try doing the following if initialize_system accepts commands from stdin:

system('echo "/PATH/skew.k ARG_FOR_FRAME_NUMBER;/PATH/savegif.k"|'. '/PATH/initialize_system');