fixes dirname