Improved testing's file loading code.
Some tidying of test code.