add logic for master to write a pidfile

# notes

I tried to place the logic in `bud.c` right above the call to `uv_run` but the ended up confused as to why there are 2 calls to `uv_run`... either way i've tested this and it seems to work as expected.
This should be something like this: https://github.com/indutny/bud/blob/master/src/config.c#L619 and `strerror()` call in `error.c`.