Extract URI from File before using it to search for config files

Fixes gh-8