Rename dir to dirname in qa/rpc-tests/util.py

Rename "dir" to "dirname" because "dir" is the name of a function in python, and it is a generally good idea to not override existing functions, even if dir is unlikely to be used.