fix another occurrence of dirname