Expand empty directories in GN to "."

When a directory substitution in a toolchain definition expands to the empty
string (i.e. it's the same as the root build directory), expand the name to "."
instead of the empty string to avoid corrupting filenames.

For example, if you specified "{{target_out_dir}}/foo" without this it would
expand to "/foo" for the default toolchain.

This removes the previous special-case hack for this case. That code only
worked when the entire string expanded to the filename (when the directory was
at the beginning of the string). When generating command lines, the directories
will be in the middle of the string and the previous special case didn't catch
them.

R=jamesr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/tools/gn@291469 4ff67af0-8c30-449e-8e8b-ad334ec8d88c