close #154 provide dirname and basename functions