Replace deprecated g_dirname
Periodic merge of branch 'maint'

- Replace deprecated g_dirname