Modify install subtask to handle certificate mismatch

This should be able to fix #46.