compile: Build output to a temporary file, then use `/usr/bin/install` to install the file with correct permissions.

Something you suggested a while ago.

I removed the `if`, I'm not sure what your original intent was (but the install will fail anyway if `compile` returns 1, right?).