import re


def dir_path(path):
    """decorate a path with a trailing slash if not present"""
    pattern='^(.*)[/]$'
    matchobj=re.match(pattern,path)
    if matchobj:
        return path
    else:
        return path+'/'