Yeah it is related to this fix - the dirname don't work if there is more than one of dir detected, instead dir gets a list and outputs a list.

By second issue, Uwe Bonnes has different dirname command on his linux machine, that don't work for him.