Allow using %= as a placeholder for the target name in the config file.

See example config for a detailed explanation of the new 'resolve-references' option.