Fix some bugs in install.script.

Change-Id: I3ed6954a958563f0b8759609e6cc17ad125b69dc