scripts: Python 3 support for run.py

Add Python 3 support in scripts/run.py. Tested with Python 3.3.4 & Python 2.7.6.

Some style issues (mixed tabs spaces, trailing spaces) are also fixed.

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>