Use getitem magic method instead of getattr

Add the __getitem__ magic method to the VariableWrapper class because the
__getitem__ string inside __getattr__ does not work.

Also fix formating and redundant comment
Merge pull request #46 from giselher/variables-fix

Use getitem magic method instead of getattr