rewrote dir_name() using strtok
Added debug statement
added debug statement
modified a debug statement