added a new method to resolve paths relative to a given basir directory.