Better --testonfolder, fixed randomization