Fix memleaks in expand_path(): spool_dir was not freed.