Template-directed synthesis, characterization and electrical properties of Au–TiO2–Au heterojunction nanowires