import imp
import os


def import_file(module_path, filename):
    """
    Import a submission file based on the filename and submission path.abs

    Parameters
    ----------
    module_path : str
        The path to the submission directory
    filename : str
        The filename of the submitted workflow element.

    Returns
    -------
    submitted_module : module object

    """
    submitted_path = ('.'
        .join(list(os.path.split(module_path)) + [filename])
        .replace('/', ''))
    submitted_file = '{}/{}.py'.format(module_path, filename)
    submitted_module = imp.load_source(submitted_path, submitted_file)
    return submitted_module

@@ -236,16 +236,17 @@
 irectory
+.
 %0A    fil
@@ -523,25 +523,20 @@
 e = 
-'%7B%7D/%7B%7D.py'.format
+os.path.join
 (mod
@@ -553,16 +553,24 @@
 filename
+ + '.py'
 )%0A    su

use os.path.join