Nanostructured Thin Optical Sensors for Trace Gas Detection