BUG #14971. Fix invalid sprintf() in vtkPNGWriter.

Using snprintf() instead of sprintf() to avoid memory overwrites. Also
avoid determining the filename when simply writing to memory.

Change-Id: I9f9591e6cb183ed68a86722fd6a52b761abf7758
Merge topic 'bug_14971_fix_head_corruption_in_vtkPNGWriter' into master

126135c2 BUG #14971. Fix invalid sprintf() in vtkPNGWriter.