Add ReadOnlyPath, a helper function, and tests.