Update Linux-specific script files.

Changes for divergence/patch scripts. Lv Zheng.
Linux divergence fixes, no functional changes.

Fixes a couple small Linux divergences. Lv Zheng.
Update .gitignore file.

New script files.