Hi David,
The problem is that the script isn't finding any source code files. Apparently there are no .c, .cpp or .h files on your TestDriver directory. The script fails (line 1033) because the "/Users/draphael/dev/TestDriver/linux/g++" directory has not been previously created, due to the fact that the project is empty (no source files).
Are you sure you're pointing the script to the correct directory?
As for the command line history, I haven't seen that behavior before. Are you running a single instance of PixInsight? (I ask because command line history, among many other things, are kept on a per-instance basis).