Write title.txt when setting title, closes #4.