$HOME/bin/ as "git-filter-mv" and
chmod a+rx git-filter-mv
It works with any special characters in filenames like tabs and linefeeds. It works with empty commits.
Based on example from
If you want to print debug messages, use STDERR e.g.
print STDERR "File: $_\n";