add postrm script, make install script safer