Adds is_writable() test before checking write access (see #377).