Delegate empty? method.
Use ref instead of r as block variable name.
Use '/' as default path.
Simplify path_exists method.