vastly improve test coverage

and fix a bug in file list parsing