Add installer automation test script and fix bugs