A plan by NASA to beam the location of Earth into space has been criticised as it could spark an alien invasion.