Fix string.Format syntax (fixes #40)

This pull request addresses #40 and sharwell#1, as well as a number of instances which are not addressed by those pull requests.