Add dirname() function.