Used dirname function for dirname method.