Export/import app settings with package name rather than uid

I was investigating the import/export mechanism when I noticed this bug. I have tested this solution and it works well for me.

It saves & restores fake data for apps, copes with the funny format for accounts etc.