As os.path.splitext returns the file extension including a dot, adding an extra one is superfluous.
os.path.splitext