add support for Unicode filenames

various other minor updates, mostly Unicode related