improve error handling during installation

Add more logic to debian postinst and preinst scripts
to prevent errors in some upgrade or install scenarios.
increment version number to 0.6.0

refs #7684