db: fromDBName/toDBName need to work if you have multiple dashes.

This is a solution for a thing I tripped over (at work, I have "#foo-bar-baz", and we detonate without this patch).  It is a hack, though, not a solution.