Creating svn-patches from ‘git svn’-repositories

Since developing for gamekit using git svn (god bless you, git!) I always wondered why there is no way to create also svn-patches with git svn. I finally stumpled over a small script that can do the job. Actually it has a bug that prevents new files/directories to be valid for svn-patches that I fixed here:
https://gist.github.com/3551647

Thx for the people that provided that piece of code.