Generate out_filename from input_filename and suffix
You can dramatically simplify the function by using the os.path.splitext() instead:

import os


def generate_out_file(in_file, suffix='out'):
    """Appends '.out' to an input filename."""
    filepath, file_extension = os.path.splitext(in_file)
    return filepath + "." + suffix + file_extension


Demo:

$ ipython3 -i test.py
In [1]: generate_out_file("./file.txt")  # file in a current directory
Out[1]: './file.out.txt'

In [2]: generate_out_file("/usr/lib/file.txt")  # path to a file
Out[2]: '/usr/lib/file.out.txt'

In [3]: generate_out_file("file.txt")  # just a file name
Out[3]: 'file.out.txt'

In [4]: generate_out_file("file")  # no extension
Out[4]: 'file.out'

In [5]: generate_out_file("/usr/lib/file")  # no extension with a path
Out[5]: '/usr/lib/file.out'