Extracting config files logic

The configuration file naming and finding logic have been extracted. This changes the SN public API by removing `config_file`, `config_file?` and `config_file_name`.