Use StringIO instead of temp file for reference checking.
Simplify bibtex checking further.