issue1573: make GFileDirName() handle the returned memory as documented.

gfiledirname is documented as returning a pointer to memory owned by the function.
This is again now the case.
Merge pull request #1617 from monkeyiq/2014/aug/1573

issue1573: make GFileDirName() handle the returned memory as documented.