Encode title using UTF-8 before printing

This fixes #170 and closes #174.