Only run the diff the current file is valid.

When using the Ack plugin, errors were being reported because % wasn't a
valid file name in the buffered to display the results of running ack.
Update the function that runs diff to only take a diff when the current
file has a valid name.