let wp_dir = ref
  (try
     let home = Sys.getenv "HOME" in
     if Sys.file_exists home && Sys.is_directory home
     then home else raise Not_found
   with Not_found -> Sys.getcwd ())