Preparation of contacts to one-dimensional nanostructurs