Changed chown so that if the owner or group is specified as -1, then that ID is not changed