Trace gas detection using nanostructured graphite layers