Method and apparatus for increasing the durability and yield of thin film photovoltaic devices