Fix rbt patch with unicode characters.

rbt patch was completely failing with unicode characters, presenting
errors on the console. We now encode thet content before writing it to a
temp file, and decode before feeling it to 'git commit'.
Fix R1:R2 syntax for git revision-range.

The refactoring for the revisions/files project caused a regression in the
0.5.3 release when using --revision-range with git. This change fixes it to
split on ':'. This change will be for the release-0.5.x branch only, since the
master branch uses the new command-line syntax.

Reviewed at https://reviews.reviewboard.org/r/5209/

Fixes bug 3182.
Merge branch 'release-0.5.x'