Make install/remove more robust across platforms.