Improved test running script