let dir_writable ?(nullglob=false) (dirpatt:filexpr) = 
  let cmd = "test -d $1 -a -r $1 -a -w $1 && echo true" in
  Check.check cmd "dir_writable" ~nullglob dirpatt