don't override dir() in qa rpc tests

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

a7af983 don't override dir() in qa rpc tests (Bryan Bishop)