afptool: fix bug with package-file in UTF-8 encoding