modify rr_testcode/makefile for more flexibility.

1. using function to select and transform filename.
2. using static pattern rule for security.
rrcheck_main.c: rrcheck_instrument has new argument in valgrind 3.9.