Better error handling + restrict to non-utf8 filenames

This doesn't actually fix the UTF8 problem, as all the filenames were
fine anyway, but I felt we should prevent future problems now (in case
pipermail decides to send even more stupid stuff at us than it already
does).
Fix UTF8 issues