Nanostructured organic–inorganic photodiodes with high rectification ratio