check if dir/files are writable