minor code reformatting
handle the case where requested resources are not relative to the cwd