ensure_dir in get_all_fits