Split tests out into multiple files (fixes #375)