updating packaging to fix upgrades

added logic to debian/postrm script
to prevent files from being deleted during upgrades
Add preinst script to work around 0.3.0 postrm