Avoid dirname(1)