Update scripts/view.py

Improved balanced parentheses check: see issue #10
Merge pull request #12 from nschneid/patch-1

Update scripts/view.py