Fix checkwrite for csh.