Fix metadata config file resolution for WMS when using subdirs

This fixes resolving of ids when looking for service-specific metadata config when configs are in subdirectories.