using a different algorithm for relative paths based on Uri.  Closes GH-72