India overcame a shaky start to defeat Australia by 295 runs in the first Test at Perth, securing a 1-0 lead in the series.