Only look for bsn and version if the URL_TEMPLATE references them

Also changed the code so that content of earlier replacements does not
get processed for later replacement.

Fixes https://github.com/bndtools/bindex/issues/13

Signed-off-by: BJ Hargrave <bj@bjhargrave.com>
Merge pull request #14 from bjhargrave/master

Only look for bsn and version if the URL_TEMPLATE references them