title: How to make a path from a string in starlark?
body: <p>I'm writing some validation code for a bazel build rule and I need to do some path validation. I need to check that a certain file exists in the same directory as the BUILD file. I notice that there's a context attribute <a href="https://docs.bazel.build/versions/master/skylark/lib/ctx.html#build_file_path" rel="nofollow noreferrer"><code>build_file_path</code></a> which points to the BUILD file. I'd like to extract the parent directory from this. </p>
  
  <p>It looks like I can't create a new <a href="https://docs.bazel.build/versions/master/skylark/lib/path.html" rel="nofollow noreferrer"><code>path</code></a> object - I don't see a constructor/initializer. It also seems like Starlark doesn't support <code>os.path</code> like python because imports aren't supported.</p>
  
  <p>What's the canonical way to get the parent directory of a string object representing a path in Starlark?</p>