Make update_archives.sh compatible with older versions of git

This should simulate the behavior of git symbolic-ref --short -q HEAD by stripping everything up to the last slash off the result of git symbolic-ref -q HEAD.  I found that building a newer git for Ubuntu precise was more difficult and dangerous than you might expect, as it requires a newer dpkg, and the latest dpkg fails to build.