A West Lothian man who had not been seen for nearly five weeks has been traced safe and well.