Fixes directory path computation in docker_build 
Fixes directory path computation in docker_build 

This fixes #1178.

When a docker_build rule has a `files` input that is at the root of the repository, it contains no / characters, and the current version of `_short_path_dirname` returns the last character of the name instead of an empty string.

Closes #2529.

--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2529
PiperOrigin-RevId: 147714720
MOS_MIGRATED_REVID=147714720

spxtr/bazel,Asana/bazel,twitter-forks/bazel,akira-baruah/bazel,juhalindfors/bazel-patches,werkt/bazel,variac/bazel,ulfjack/bazel,ulfjack/bazel,spxtr/bazel,akira-baruah/bazel,ulfjack/bazel,spxtr/bazel,snnn/bazel,perezd/bazel,variac/bazel,dslomov/bazel,aehlig/bazel,juhalindfors/bazel-patches,bazelbuild/bazel,ButterflyNetwork/bazel,katre/bazel,safarmer/bazel,perezd/bazel,davidzchen/bazel,damienmg/bazel,akira-baruah/bazel,dslomov/bazel,aehlig/bazel,Asana/bazel,cushon/bazel,ulfjack/bazel,twitter-forks/bazel,ButterflyNetwork/bazel,meteorcloudy/bazel,dslomov/bazel-windows,meteorcloudy/bazel,aehlig/bazel,twitter-forks/bazel,Asana/bazel,cushon/bazel,werkt/bazel,aehlig/bazel,variac/bazel,twitter-forks/bazel,davidzchen/bazel,Asana/bazel,aehlig/bazel,safarmer/bazel,aehlig/bazel,twitter-forks/bazel,bazelbuild/bazel,meteorcloudy/bazel,dropbox/bazel,damienmg/bazel,spxtr/bazel,safarmer/bazel,bazelbuild/bazel,damienmg/bazel,ButterflyNetwork/bazel,dropbox/bazel,katre/bazel,juhalindfors/bazel-patches,dropbox/bazel,dslomov/bazel-windows,juhalindfors/bazel-patches,perezd/bazel,cushon/bazel,Asana/bazel,damienmg/bazel,katre/bazel,davidzchen/bazel,akira-baruah/bazel,Asana/bazel,perezd/bazel,perezd/bazel,katre/bazel,meteorcloudy/bazel,snnn/bazel,spxtr/bazel,cushon/bazel,dslomov/bazel,dslomov/bazel-windows,dslomov/bazel,safarmer/bazel,bazelbuild/bazel,akira-baruah/bazel,meteorcloudy/bazel,meteorcloudy/bazel,Asana/bazel,snnn/bazel,aehlig/bazel,damienmg/bazel,cushon/bazel,twitter-forks/bazel,werkt/bazel,variac/bazel,davidzchen/bazel,juhalindfors/bazel-patches,juhalindfors/bazel-patches,ButterflyNetwork/bazel,bazelbuild/bazel,werkt/bazel,perezd/bazel,dropbox/bazel,snnn/bazel,cushon/bazel,safarmer/bazel,variac/bazel,ulfjack/bazel,dslomov/bazel,variac/bazel,bazelbuild/bazel,snnn/bazel,meteorcloudy/bazel,ulfjack/bazel,werkt/bazel,katre/bazel,spxtr/bazel,damienmg/bazel,damienmg/bazel,spxtr/bazel,snnn/bazel,davidzchen/bazel,dslomov/bazel-windows,davidzchen/bazel,dslomov/bazel-windows,ButterflyNetwork/bazel,akira-baruah/bazel,safarmer/bazel,dslomov/bazel,twitter-forks/bazel,dslomov/bazel,dropbox/bazel,snnn/bazel,ulfjack/bazel,dropbox/bazel,davidzchen/bazel,variac/bazel,perezd/bazel,juhalindfors/bazel-patches,werkt/bazel,dslomov/bazel-windows,ButterflyNetwork/bazel,katre/bazel