get_ref_dir(): require that the dirname argument ends in '/'