Also, could be `if not base_path.endswith("/"):`