Fix stat(), expand test plugin