Fix encoding issues with tempfile-database