Analytical strategy for studying the formation and stability of multilayered films containing gold nanoparticles