def normalize_directory(directory):
    """ Normalize a directory path.

    Normalizing a directory path consists of turning it into a relative
    directory path, even if it initially was a relative directory path.

        /foo/bar/qaz -> foo/bar/qaz
        foo/bar/qaz  -> foo/bar/qaz

    A normalized directory path can be combined with the (path of the)
    root directory.
    """
    return directory.relative_to(directory.root)
