add m_dirname that implement a non broken libgen-like function.