Fix format arguments in CaptureMessagef

Hey,

`CaptureMessagef` doesn't seem to actually format the message; it appears to be due to not expanding the input arguments on the subsequent `Sprintf` call. This change appears to fix it.