Fix Bug #1228905 Calibre does not create a valid .bib file
BibTeX catalogs: Strip unmatched braces

BibTeX catalogs: Strip unmatched braces to ensure to revent generation
of invalid .bib file. Fixes #1228905 [Calibre does not create a valid .bib file](https://bugs.launchpad.net/calibre/+bug/1228905)

Merge branch 'bibtex_fix' of https://github.com/alexbiddle/calibre