path: properly resolve relative paths