Optimized immobilization of gold nanoparticles on planar surfaces through alkyldithiols and their use to build 3D biosensors.