Use svnversion to capture svn revision number

I was running into an issue with the sed part of the previous implementation (using GNU sed 4.2.1, from Debian Wheezy), so at first I set out to fix that issue. But then I discovered the svnversion command that ships with svn, and that seems to do the trick just as well.