directory: Add a get_path.

Just in case, this implementation is very inefficient.

Also, I gonna bring back the leading slash. Current situation is a mess.