Fixed up spacing of latex figure

If figure has a prefix (i.e., [Figure][fig:...]) then output Figure~\ref{... otherwise don't put a space before.