add basename and dirname functions