Add dirname to os.path functions accessible through api.path.
Add dirname to os.path functions accessible through api.path.

BUG=

Review URL: https://codereview.chromium.org/1692283002

luci/recipes-py,luci/recipes-py