Would use `os.path.splitext`