[#8375] fix py2 regression on unified_diff; apply similar fixes in ForgeUserStats

py2 unified_diff only works with str (bytes) filenames since it has within it:

    yield '+++ {}{}{}'.format(tofile, todate, lineterm)

py3 unified_diff only works with str (unicode) filenames
3 files changed