Improve gen_struct_info.py

I corrected some errors in the script's comments and added a check to automatically run it whenever src/struct_info.json changed.