Fix bug in dimensions check.

Expression (3 == 3 == 3) is false in C and C++.
Ignore sconsvars.py file for local build preferences.