will construct kwargs for cmd

def casperjs_command_kwargs():
    """ will construct kwargs for cmd
    """
    kwargs = {
        'stdout': subprocess.PIPE,
        'stderr': subprocess.PIPE,
        'universal_newlines': True
    }
    phantom_js_cmd = app_settings['PHANTOMJS_CMD']
    if phantom_js_cmd:
        path = '{0}:{1}'.format(
            os.getenv('PATH', ''), os.path.dirname(phantom_js_cmd)
        )
        kwargs.update({'env': {'PATH': path}})
    return kwargs