Add/fix export to apkg functionality
Merge pull request #482 from timrae/apkgExport

Add/fix export to apkg functionality