src: dirname: implemented own dirname()
src: dirname: added support for multiple paths