Add support for *chown*() syscalls.

Resolves #1383.

Someone may want to skim over this, it's my first patch for a while and there's some unfamiliar stuff to me.