Nanoscale properties of lead halide perovskites by scanning tunneling microscopy