Use pathName instead of package.json's directory

This is necessary for addon projects that keep the package.json in its
root but the test/dummy app is nested elsewhere