def append_filename_to_path(path, filename):
    """Append a filename to a system file path.

    This method correctly appends a filename to a file path with the
    correct path separators used within the path string.

    Args:
        path (:obj:`str`): The system file path.
        filename (:obj:`str`): The filename to append.

    Returns:
        :obj:`str`: The filename correctly appended to the file path.
    """
    if len(path) > 0 and path[-1] in ('/', '\\'):
        return f'{path}{filename}'
    elif '\\' in path:
        return f'{path}\\{filename}'
    else:
        return f'{path}/{filename}'
