Nanostructured P3HT layers fabricated by self-assembly as promising gas sensors