export: handle invalid references
I noticed this one while going through old bugs. While at it, I adjusted the warnings message to be consistent with Mercurial's style:
warning: not exporting bookmark 'whatever' due to invalid name
See the bug for an example of the stack trace.
Fixes #163 (closed)