def projectpath(directory):
    root = os.path.abspath(directory)
    name = os.path.basename(root)
    return root, os.path.join(root, name + '.sublime-project')