Adding partition check

not that this is wrong but its more common to do something like:

acc, cont, obj = split_path(metadata['name'], maxsegs=3, rest_with_last=True)

its a little easier to read too.