Checks if a file with that name can be created. If successful, any pre-existing file does not exist any more.
checkFilename(filename, overwrite=TRUE)
TRUE if a new file can be created, else FALSE. If TRUE, no file of that name exists (any more)
a file name with or without path. If the name contains a path the entire path must already exist, else the file cannot be created and the result is FALSE.
if TRUE an attempt is made to delete any pre-existing file of that name; the function returns FALSE if the file is locked or the user has no rights to delete the file. If FALSE the function returns FALSE if any file of that name already exists, and no attempt is made to remove it