Correctly detect approot in the setup script