Fix detection of malformed formatting token at end of string

'%(count) blah' was detected as an error, but '%(count)' was not.
This fixes that.
Detect missing } in Python formatting vars

Fixes #20.