A missing Edinburgh man who police warned the public not to approach has been traced safe and well.