Add Emacs backup files to .gitignore.
Rearrange the SCons build to allow for tests.
A bit more reformatting and tinkering with language constructs.