Handle clash between prefix and config-files

Previously the path under staging was ignoring the
specified prefix when searching for config files,
leading to file not found errors.