Get data path

Small refactor to remove duplication of `get_data_path`, which has a new implementation.