Update gen_local_scripts.m from master