Replace "dir" with "dirname" in util.py in qa/rpc-tests/ because "dir" is the name of a function in python.