Added a check for invalid variable names.

Fixes #99