Properly resolve paths