Remove 1-line dirname dependency