refactoring: small improvement of make_path()