add script extract_to_basename_dir.sh