Fix bugs in extractVar, add a test for it.
Add a Travis-CI settings file.