Made run script instal as executable.

Also fixed a small bug with the run script.