bug fix GetUniqueFileName() did not consider directory