Update and rename test31.out.txt to test31.ref