Get the export/import pbi functionality working, and also fix a bug in the download message parser.