Fix whitespace.

This script used an inconsistent mix of spaces and tabs, and even
ignoring that, it still had inconsistent indentation, which is
pretty scary for a Python script. I also removed trailing whitespace
from some lines.