do not reinvent the wheel: use `path.resolve`