Improve reporting of format specifiers

Fix #277.

Adjust the logic to report specifier locations only if format strings are wellformed.

/cc @vasily-kirichenko