fix test script to handle initial 404s