Draft patch from Scott Howard to add --chmod.