Rename to be more descriptive and take a project object.

The 'relative' function was only being used to get the path relative to the project's root. This changes the API to take the project object and renamed to make it explicit what's happening.