dirname free issue