Make GUI save references in reference list and BibTeX file.

Saved references are written in src/references.bib file when write
button is pressed.