Break config finding out into separate module

Done only so that testing is easier
Tests for config finder function