I written a Ruby tool, named `foobar`, having a default configuration into a
file (called `.foobar`).

When the tool is executed without any params, the configuration file's params
can be used: `~/.foobar`.

But, if the current tool's path is `~/projects/foobar` and if
`~/projects/foobar/.foobar` exists, then this file should be used instead of
`~/.foobar`.

That's why the way to look for this configuration file should start from the
current folder until the current user folder.

Is there a simple way to look for this file?