Because you are renaming the filenames as you list them. Why not create a function that takes a source filename and a destination filename to do the conversion. Then your main code just needs to use
os.listdir
to get the source files, create the destination names and pass the two values to the function.
def convert(source, destination):
for filename in os.listdir(source_directory):
file, extension = os.path.splitext(filename)
unique_filename = str(uuid.uuid4()) + extension
source = os.path.join(source_directory, filename)
dest = os.path.join(source_directory, unique_filename)
convert(source, dest)