Length scaling of carbon nanotube electric and photo diodes down to sub-50 nm.