[core] get_directory(): gets directory relative to the site root
This is intended to use get_directory(__DIR__) to get the URL
to the current directory.
e.g. in quux/foo/bar.php, you call $dir = get_directory(__DIR__).
The value of $dir will be "quux/foo".