This function creates a new string containing an unique name, not avaible in the given path when checking. This is useful when you want to create, for example, some temporary files and want to be sure an unique name is used.
A *new* AFC string, that you'll need to free with afc_string_delete() when you're done.
A NULL value means an error occurred.
this function can handle NULL pointers
remember to free the string using afc_string_delete() when you have finished with it.