Move sudo out and process --prefix.