More tests of -o and -lib for .tokens files and imports, some useful refactoring.