fix bug when base_path is `.`